-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setInstrument does not support reading from SRAM on Arduino hardware #47
Comments
Hi @virtuaCode this was done intentionally because fitting a full instrument library into SRAM would eat a lot of memory (especially for an Uno or Nano with just 2k). I didn't want to limit people's creativity when working with the example code by taking most of their memory :). However having said that I have a local change already where instruments can also be set directly from RAM along the lines of what you have, because it's still handy to have. |
This update adds structures and functions for simpler user defined instruments. createInstrument - Creates a new empty instruement getInstrument - Creates a new instrument from the given OPL2 channel loadInstrument - Loads a predefined instrument setInstrument - Set an instrument to an OPL2 channel with optional volume Currently only melodic instruments are supported using this approach. The current setInstrument function will be deprecated and will give a warning when used. Also note frequency umbers have been corrected as then were a semitone too high. Related to #47
Hi @DhrBaksteen,
I'm working on a modified version of the TeensyMIDI example where I want to store part of the instruments in the EEPROM or SRAM, so I can modify and store them permanently on my Arduino Uno. Unfortunately
setInstrument
does not support reading from SRAM when the board type is set toOPL2_BOARD_TYPE_ARDUINO
.Here's my workaround for this problem:
virtuaCode/ArduinoOPL2@6664009
The text was updated successfully, but these errors were encountered: