-
Notifications
You must be signed in to change notification settings - Fork 31
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
SDcard: using to fill [data] objects #16
Comments
Record *.wav to SD? |
Some potential applications and impacts:
This also suggests it might be desirable to have an OLED page displaying [data] contents. Which would be sweet for something like a shift register patch. |
Daisy would make such an awesome drum machine with its 4 outputs. Maybe controlled not with gates necessarily but more the way MakeNoise morphogene works. And I’m really eager for my param knob settings to persist through power cycle. thumbs up on this issue! |
Update: the It works as follows; for example, if you have a gen~ patcher with a [data foo], AND if there's a "foo.wav" in the same folder as the exported cpp, oopsy will notice that and insert code to auto-load a "foo.wav" (if found) from the sdcard when the patcher loads. Lots more work to be done yet, but a minor step of progress. |
Wow that is great! And I am a NOOOOOB. How can I start using that feature? |
Update: a second way to have [data] auto-load from a wav on sdcard is to name it ending in "_wav", e.g. [data foo_wav] will load foo.wav. Currently the [data] doesn't resize to fit the wave file itself, so make sure your [data foo_wav ] is big enough! I'm looking into how to do auto-resizing without causing memory leaks. |
Hey! I try read wav file from sd card. And it's not work in my case. May be I'm doing someting wrong? I have 6 seconds test.wav file in the root of the 16gb micro sd card. And I try load it with And other issue: if I try set size of data by constant or mathematical expression, I got error: |
Just a quick verification: are you on the This example works for me (you'd need to add "drumloop.wav" to your SD card):
|
Hi @grrrwaaa, Will there be a "save to SD" coming soon ? I ask because I would like to be able to save sequencer data/setup and reload it. Thus, I thought I would check in and see if saving to SD is possible. Thanks, |
It's in the roadmap (see 4 above) but unlikely to be "soon", simply because of my workload. |
@grrrwaaa Unfortunately, this example doesn't work for me either. How can I check the health of the card reader? Maybe the problem is in the card itself? Are there any requirements for the size and type of sdcard? I use this: |
Not sure if you missed this earlier: are you on the dev branch of Oopsy? The screenshots you posted above are the main branch, which doesn't have the SDcard support merged in yet. Otherwise, if you are on dev, and it is a possible card / hardware issue, you might try posting questions on the Daisy forum or slack. |
Hi @grrrwaaa If we want to load multiple WAVs into the same Gen~ patcher, what is the best way to achieve this? I tried creating a second buffer~ object and duplicated all of the objects inside the Gen~ patcher, then replaced the file name with another audio file in the Max library, but I have yet to get any sound from the second set of buffer/data/sample objects. Update: Figured it out :) Just declare each sample in the Gen~ object arguments with "@buffer_wav buffername". One pair for each sample/buffer. |
I have not been able to make the "drumloop.wav" example work on my daisy patch yet. I am using the dev branch and placed a "drumloop.wav" file on both my SD card and in the same folder as sdcard.cpp (as mentioned above in one of the comments), but to no avail. My daisy patch shows a "no drumloop.wav" message. What might I be overlooking? |
Now that I've reformatted my SD Card to MSDOS FAT-16, I am able to make use of the SD Card via the data object. It works really well :) Have you had success in loading two .wav files from the SD Card into a single oopsy patch? I've created a test patch using the Oopsy Patch template. While developing within Max, the two data/buffer pairs load and play simultaneously. When I attempt to flash the patch to my Daisy Patch, I run into a "compiler error". If I remove one of the data objects inside the gen~ object and remove one of the argument pairs from the gen~ object, the patch compiles without issue.
|
I cannot get this to work unfortunately. Sandisk ultra formatted to FAT16. drumLoop.wav onto SD card. Changed the aiff file to 16bit wav. 96khz for 96khz export if that matters. Also tried lower sample rate exports. I do not receive an error that there is no wav file present with the export. wav file is also where .cpp file is located in source folder. wav is in otherwise empty root directory. drumLoop.wav. Converted from .aiff to wav with RX. Max patch adjusted to be "buffer~ drumloop drumLoop.wav" and max patch is functioning fine. |
Hi Simon, Sorry for the delay in catching up to this. Found the bug, and just pushed a fix -- if you git pull on the dev branch, let me know if it is working for you too. Graham |
I'm really not sure what the problem can be.
The WAV loader supports 16, 24, and 32-bit PCM data. The samplerate doesn't matter (it's not used by gen~ anyway). I just pushed an absolute minimal example to the |
No Problem, Graham. I know you're busy, thanks for taking the time. I git pulled the dev branch just now, but the fix isn't working for me yet. I still get a compiler error message when trying to flash a patch with two data objects to my hardware, and I am getting compiler messages trying to flash the daisy patch blank example, so I think something didn't go quite right. I opened a new terminal window at the oopsy folder and ran "git pull". It seemed like everything updated alright, but all oopsy bpatchers are throwing compiler errors at the moment. Copied the log for one of the attempts below.
|
There was a bump in the libdaisy version -- you'll need to rebuild libdaisy (e.g. run ./install.sh from Oopsy root). |
Ah right, of course. Did that just now. No more compiler errors and I am able to successfully read two files at once on my daisy patch now. Thanks! |
Hi there @grrrwaaa I've been testing the SD card functionality during the past week and I want to share my findings so far.
The patch: |
I'm not sure either... Ok some progress. After reinstalling daisy etc. I can get a no drumloop.wav error with no SD card. When I put an SD card in and reboot daisy, it freezes. If I load the patch with no file or sd card its working just no wav. If I have another wav file name in there, it also works. It only freezes when the name of the wav file matches identically. I've just reformatted again to FAT (16) and a slow format just to make sure things are alright on a on a new sandisk ultra. **Ok its working and I'm gonna die of joydom. Something must have been wrong with my file at the end of the day. When in doubt reinstall everything and build from scratch lol. |
Ah, great! That's awesome you've got it working over there now. I was also having trouble prior to reformatting my SD card, so that seems to be part of the problem. An update on my multi-sample Oopsy patch posted last week:
|
I can´t get it to work On C++ I changed the BusWidth from 4 to 1, and it works Can you change the BusWidth on oopsy? |
Hi everyone! Is there functionality to store a play a WAV File on the board without an SD card? (just data object in gen~, which reads from a buffer~ in the enclosing patch, for example) |
Data objects could load audio data from wave, other binary, or even text files stored on SDcard if the names match.
The text was updated successfully, but these errors were encountered: