[nama] Change samplerate command

  • From: "Jeanette C." <julien@xxxxxxxxxxx>
  • To: nama users' mailinglist <nama@xxxxxxxxxxxxx>
  • Date: Fri, 18 Aug 2017 15:29:56 +0200 (CEST)

Hey hey,
if you'd like to have a "real Nama command" to change the samplerate, while working inside Nama, you can paste the attached file into your customize.pl, inside the commands section. It will warn against trying to set unusual samplerates or when you omit the samplerate completely. I have to work out a way to recognise a omitted samplerate. I tried it, it appears to work.

Best wishes,

Jeanette

--------
* website: http://juliencoder.de - for summer is a state of sound
* SoundCloud: https://soundcloud.com/jeanette_c

Cinderella's got to go <3
(Britney Spears)                # Change the current project's sample rate
                # Usage: change_samplerate <samplerate>
                # Accepted sample rates: 8kHz, 11025Hz, 16kHz, 22.05kHz, 24kHz, 
32kHz,
                # 44.1kHz, 48kHz, 64kHz, 88.2kHz and 96kHz
                change_samplerate => sub {
                        my ($srate) = @_;
                        if ($srate == 96000 or $srate == 88200 or $srate == 
64000 or $srate == 48000 or $srate == 44100 or $srate == 32000 or $srate == 
24000 or $srate == 22050 or $srate == 16000 or $srate == 11025 or $srate == 
8000)
                        {
                                $project->{sample_rate} = $srate;
                        }
                        else
                        {
                                print ("$srate is not an allowed 
samplerate.\n");
                                print ("Use one of: 8000, 11025, 16000, 24000, 
32000, 44100, 48000, 64000, 88200\nor 96000.\n");
                        }
                        print ("\n"),
                },

Other related posts:

  • » [nama] Change samplerate command - Jeanette C.