# # SamplerBox local configuration # # SamplerBox extended by HansEhv (https://github.com/hansehv) # see docs at http://homspace.xs4all.nl/homspace/samplerbox # license: Creative Commons ShareAlike 3.0 (http://creativecommons.org/licenses/by-sa/3.0/) # ################################################################################### ## Adapt to your setup ! ## Don't delete value definitions, program expects them all (no internal defaults) ## - exception to this rule: GPIO definitions of unused devices ## Values are used 'as is' with hardly any error checking, some friendly warnings: ## - read the comment ... and do it right, because: ## - errors may lead to malfunctioning in unexpected ways. ################################################################################### [config] ###### General values ###### USB_MOUNTPOINT = /media/usb/ # -1=autodetect, specify ID of your device to override AUDIO_DEVICE_ID = -1 # ..or specify (part of) it's name. SB uses the first match of ID or NAME. AUDIO_DEVICE_NAME = Detect # Fill this to override autodetection, specify None to disable alsa volume control MIXER_CONTROL = Detect # Sets value for wav's and audio device (these have to be the same) SAMPLERATE = 44100 # Blocksize or "Low"/"High". High may cause latency, low may cause distortion# just try. # Valid numbers for blocksize are shown in the console messages when started manually BLOCKSIZE = High # Sets audio to 48000Hz while keeping wav's on 44100Hz. Try to avoid this... USE_48kHz = False # Set True to enable MIDI IN via SerialPort (e.g. RaspberryPi's GPIO UART pins) USE_SERIALPORT_MIDI = False SERIALPORT_TIMEOUT = 0.01 SERIALPORT_REALTIME = False SERIALPORT_SYSEX = False # --- next display definitions are mutually exclusive = you can have only one # # Set True to use a 16x2 direct connected/wired HD44780 LCD, configure GPIO pins below USE_HD44780_16x2_LCD = False # If you use an I2C-HD44780, above option should be false !!! # Set True or 16x2 (=True) or 20x4 to use a 16x2 or 20x4 I2C connected HD44780 LCD USE_I2C_LCD = False # # Set True to use an OLED display, configure GPIO pins below USE_OLED = False # # Set True to use LCD of Pimoroni PirateAudio hat. Configure GPIO pins below USE_PIMORONI_LCD = True # # Set True to use a 7-segment display via I2C # Two versions: original sparkfun display and cheap HT16K33 based ebay version USE_I2C_7SEGMENTDISPLAY = False USE_i2c_7SEGMENTDISPLAY_HT16K33 = False # # --- above display definitions are mutually exclusive = you can have only one # Set True to use the GPIO buttons, configure GPIO pins below USE_BUTTONS = True # Set True to use LED's connected to RaspberryPi's GPIO pins, configure below USE_LEDS = False # should webgui server be started? USE_HTTP_GUI = True # Builtin StandardMidiFile player USE_SMFPLAYER = True # This can be set higher, but 80 is a safe value MAX_POLYPHONY = 80 # Used memory percentage at which loading of samples stops MAX_MEMLOAD = 90 # Master midi channel and midi channel of the drumpads (if applicable, # see "Keyboards with drumpads" in MoreInfo in the docs for usage) # If drumpad channel=0, it's disabled (fyi: drumchannel is usually 10) # If 1-16 (except master channel), then note-on/off will be recognized, # with processing of program/controlchange messages as defined below. MIDI_CHANNEL = 1 DRUMPAD_CHANNEL = 0 DRUMPAD_PROGRAMCHANGE = False DRUMPAD_CONTROLCHANGE = False # Multi timbral devices, comma separated. # Exactly as in the midi open message, but without quotes! # A real multitibral has all it's channels remapped/separated # For MULTI_WITHMASTER the channel=MIDI_CHANNEL will behave as master MULTI_TIMBRALS = MULTI_WITHMASTER = # Devices to receive SB's input, either "All" without quotes or comma separated values, # use regular expressions for patterns (see docs on MIDI-THRU) MIDI_THRU = # Controlnumber used when using music notes for controls (=as CC). NOTES_CC = 119 # Sample mode is how the samples are played, Keyb is standard MIDI behaviour. # Keyb - reacts on "keyboard" interaction # Once - ignores loop markers ("just play the sample with option to stop") # Onc2 - ignores loop markers with note-off by same note ("just play the sample with option to stop") # Loop - recognize loop markers, note-off by same note ("just play the loop with option to stop") # Loos - recognize loop markers, note-off by 127-note ("just play the loop with option to stop") BOXSAMPLE_MODE = Keyb # Granularity of velocity samples/levels (127 is original samplerbox) # and velocity mode (the reaction on the keypress/volume) # Sample - velocity equals sampled value, requires multiple samples to get differentation # Accurate- velocity as played, allows for multiple (normalized!) samples for timbre BOXVELOCITY_LEVELS = 1 BOXVELOCITY_MODE = Accurate # Value of "Right side", "Left side" has some notes slack # 88-key: - 108=C8 # 77-key: - 103=G7 # 61-key: - 96=C7 BOXSTOP127 = 109 # the startup (alsa=output) volume (0-100) # assumed value of the volumeknob controller before first use, max=1.0 (the knob can only decrease). volume = 87 volumeCC = 1.0 # default gain when switching presets. See parameter reference %gain # Possible values: "2", "1.5", "0.25", ".5" etcetera, without quotes ofcourse. BOXGAIN = 1.0 # 30 results in the samplerbox default (FADEOUTLENGTH=30000) BOXRELEASE = 30 # the "release value for damp": how quick do sounds die on damp pedal and retrigger # (do not) play release sample when damp is used (for damper noise or rattling snares etc) BOXDAMP = 10 BOXDAMPNOISE = False # action on retriggered still playing notes (occurs in once/loop modes and chords): # R: - Noteoff and fadeout according release value # D: - Noteoff and fadeout according damp value # Y: - Yes, retrigger is allowed, keep the playing sound BOXRETRIGGER = R # release samples: N=none, E=Embedded, S=Separate # crossfade glues the main sample to the release sample BOXRELSAMPLE = N BOXXFADEOUT = 10 BOXXFADEIN = 1 BOXXFADEVOL = 1.0 # Presetbase: does the programchange / sample set start at 0 (MIDI style) or 1 (human style) # Preset: the default patch to load PRESETBASE = 0 PRESET = 0 # Pitchrange: default range of the pitchwheel in semitones (max=12 is een octave up&down) # Pitchbits: pitchwheel resolution, 0=disable, max=14 (=16384 steps) # values below 7 will produce bad results PITCHRANGE = 12 PITCHBITS = 7 ###### Mapping of GPIO_pins: adapt to your hardware wiring/setup ##### # GPIO modules in this build use mode=BCM. Modes cannot be mixed. # Make sure used devices do not overlap in their pin usage (except power/gnd ofcourse), # but for unused devices it is safe to keep or delete the definitions here as you like. # In example below buttons 18&27 overlap# I use a box with buttons&LCD and one with HiFiBerry&Leds. # Some devices require no mapping here, but do use pins: # -- EEPROM : 0,1 # -- Serial Port : 14,15 # -- I2C : 2,3 # -- HiFiBerry : 2,3,18,19,20,21 # -- PirateAudio Hat : 5 (Button A), 6 (Button B), 16 (Button X), 24 (Button Y) # -- USE_BUTTONS -- # A valid GPIO value will activate the button # Increase, increases value/proceeds to next menu choice # Decrease, opposite of above. In 3-button setup it will return from submenu # Select, either selects menu choice or returns to menu from value set # Return, if this button is available, it returns to menu and the decr-button is consistent BUT_incr=05 BUT_decr=06 BUT_sel=16 BUT_ret=24 # -- USE_LEDS -- LED_red=27 LED_green=22 # -- USE_HD44780_16x2_LCD -- 4 bits operation # E=Enable, RS=RegisterSelect, Dx are data lines # in below setup D6=18 needs rewiring if HiFiBerry is used LCD_RS=7 LCD_E=8 LCD_D4=27 LCD_D5=17 LCD_D6=18 LCD_D7=4 # -- USE_I2C_LCD -- HD44780 (I2C connection), either 16x2 or 20x4 # Adapt to your I2C chip (e.g. PCF8574A(T) uses 0x3f, whereas PCF8574(T) uses 0x27). I2C_LCD_ADDR=0x3f I2C_LCD_PORT=1 # -- USE_OLED -- OLED connection and device settings (SPI connection) # Set to the correct OLED driver chip, one of: SH1106 or SSD1306 (more to come) # RSt=Reset, CS=ChipsSelect, DC=data/command OLED_DRIVER = SH1106 OLED_RST=25 OLED_CS=8 OLED_DC=24 OLED_PORT=0 OLED_WIDTH=128 OLED_HEIGHT=64 OLED_PADDING=-2 # -- USE_PIMORONI_LCD -- LCD connection and device settings (SPI connection) # BL=Backlight pin, CS=Chips select pin, DC=data/command pin # PORT=LCD device port, default should be fine PIM_LCD_DRIVER = ST7789 PIM_LCD_BL=13 PIM_LCD_CS=1 PIM_LCD_DC=9 PIM_LCD_PORT=0 PIM_LCD_WIDTH=240 PIM_LCD_HEIGHT=240 PIM_LCD_PADDING=-2 # padding around the display content, important for readability # ********* Currently unused, kept for future use # Enables IPv6 on http_gui and shows the IPv6 addresses on displays # If the /boot/cmdline.txt contains "ipv6.disable=1" (samplerbox setting), # this has to be removed or set to 0. You will hardly ever need it... # ===> At this moment this doesn't work (anymore) so leave it to False USE_IPv6 = False