Search results

  1. G

    Error: "reference to 'byte' is ambiguous" issue using VSCode, PlatformIO, macOS 13.5.1

    No I am not using the std namespace anywhere in my own code, as I mentioned above, BUT I just found that some library code indeed IS using the std namespace! But why was this not presenting a problem for so long up until now? Very strange, but thank you for suggesting this again because I didn't...
  2. G

    Error: "reference to 'byte' is ambiguous" issue using VSCode, PlatformIO, macOS 13.5.1

    Ok, I was able to compile by using uint8_t, but since my project uses the Keypad library, I had to also change Keypad to use uint8_t instead of byte too. Thanks for the tip, I'm very much not sure why this issue is happening now vs. before, but glad I can at least compile.
  3. G

    Error: "reference to 'byte' is ambiguous" issue using VSCode, PlatformIO, macOS 13.5.1

    Here is a portion of the compiler output: In file included from src/XRAsyncIO.cpp:1: include/XRAsyncIO.h:62:9: error: reference to 'byte' is ambiguous 62 | byte buffer[ASYNC_IO_W_BUFFER_SIZE]; | ^~~~ In file included from...
  4. G

    Error: "reference to 'byte' is ambiguous" issue using VSCode, PlatformIO, macOS 13.5.1

    No, I'm not. Yes, i'm including the Arduino header. I'm kind of thinking it might be something with the way PlatformIO is caching or scanning for dependencies out of order or some sort of linker error after trying to compile the project from scratch after cloning the repository locally on the...
  5. G

    Error: "reference to 'byte' is ambiguous" issue using VSCode, PlatformIO, macOS 13.5.1

    Hi, I have a project which was previously compiling just fine on my MacBook Pro, but my computer had to be wiped so I've had to reinstall everything. I'm using VSCode, PlatformIO, a Teensy 4.1, and my MacBook Pro is running on macOS 13.5.1. It appears that something has seemed to cause a...
  6. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Latest branch seems good so far for me. Just an FYI, I made my own fork here because I'm using PlatformIO and I had to modify ResamplingReader.h to use forward declarations in a ResamplingReader.cpp file for the resetStatus, getStatus, and triggerReload functions. Semi-unrelated question: if I...
  7. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Another question: I notice better playback timing for short one-shot samples (~100kb file size or less) when using a smaller sample size and buffer count (say, 512 samples @ 5 buffers). However, for longer samples (and larger file sizes) I tend to hear some glitchiness when initially playing a...
  8. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Sent you an invite! Feel free to look at your leisure. Would appreciate any feedback you are able/willing to give.
  9. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Yeah some instrumentation would be good, I hope to get there eventually, still just in the "trying to keep all these jenga blocks from falling over" phase of development. I have a lot of tech debt already. I would add you as collaborator to my repo if you're interested in possibly having a...
  10. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Thanks. Could it be feasible option to have the sample files’ open/close states programmatically set by the user? The sample files could remain open while a pattern is playing them, so that they only need to be opened once. Then, when a pattern changes and different samples are used on the next...
  11. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Was thinking something like this, conceptually: #define MAX_TRACKS 16 #define MAX_STEPS 64 void onStep() { // Iterate over all tracks for (uint8_t t = 0; t < MAX_TRACKS; t++) { // Get the current step of the track uint8_t current_track_step =...
  12. G

    changing pitch of audio samples - TeensyVariablePlayback library

    So I tried out both configurations, I have some observations: I'm using PlatformIO, so I'm not sure if it's that, but I was getting an error about play_failed() being undefined. It's declared but there's no definition as far as I can see? I just commented it out so I could compile. I wasn't...
  13. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Yes I was looking at your thread and have been tinkering around, thank you! Sorry for derailing the thread a bit. I will try to use this soon and report back, very much appreciated.
  14. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Thank you both. I should clarify that I am referring to displaying the static waveform of an entire audio sample file. I am not currently looking to draw an oscilloscope style realtime audio waveform. My device has a line input for recording samples, and I would like to be able to show a visual...
  15. G

    changing pitch of audio samples - TeensyVariablePlayback library

    @h4yn0nnym0u5e I'm also interested in using sample data to display the sample waveform on my display. Is there currently a way I can read out the buffered sample data in a loop or something? I wasn't sure of a method on the playback object to fetch the sample data. Just curious.
  16. G

    Attempting non-blocking concurrent SD read/write access

    Yes, I am now. Before using the modified SdFat library, my program would still hang even when checking for the card being busy.
  17. G

    Attempting non-blocking concurrent SD read/write access

    Yes, I was (and am) currently doing that check before reading or writing. The issue at the time was with the buffered audio which was using EventResponder while the underlying SD library was calling yield(). The issue only seemed to occur when I was trying to write to the SD card during audio...
  18. G

    Attempting non-blocking concurrent SD read/write access

    > when you're reading from an audio file, what is the data rate required for smooth playback? Maybe @h4yn0nnym0u5e can chime in here, but I have his SD audio buffering code right now configured at 7 buffers of 512 samples per playback object. My project currently uses a max of 16 playback...
  19. G

    Attempting non-blocking concurrent SD read/write access

    Hm, for my specific application, I'm honestly not sure it could be simplified that way. Right now, my application only checks if I need to write every 1 second (Y=1). I don't automatically write every 1 second, I wait until there's a signal telling my application that there are changes that...
  20. G

    Attempting non-blocking concurrent SD read/write access

    I ended up using a state machine approach, as well as queues. I think eventually it might make sense to parallelize the reads/writes, instead of doing them on a sequential queue basis, but for now it seems fast enough and doesn't cause too much of a performance problem. Here's how I basically...
  21. G

    Seeking to open source my xr-1 groovebox

    I use two PSRAM chips (16MB total) for various things, primarily sample buffering and large data structures.
  22. G

    Seeking to open source my xr-1 groovebox

    Just the sgtl5000
  23. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Just wanted to provide a demo video of my groovebox making some dance music using the new sampling code :)
  24. G

    Attempting non-blocking concurrent SD read/write access

    Just a note, I'm hearing bits of glitches on the streamed samples sometimes now when the concurrent reading/writing starts, but it may be the buffer and chunk sizes I need to play with.
  25. G

    Attempting non-blocking concurrent SD read/write access

    It works swimmingly now so far! Writes seems to do well at 4kb chunks so far. It took ~77ms to write ~360k data to a file. Thank you yet again for all your help and diligence on this!
  26. G

    Attempting non-blocking concurrent SD read/write access

    Oh no, is this a kind of showstopper? Is this only applicable when writing to the SD?
  27. G

    Attempting non-blocking concurrent SD read/write access

    Hm I thought I should only keep the file open briefly to write one chunk at a time because the SD card can only have a single file open at a time, and I want the audio playback objects to not be stalled trying to open files.
  28. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Got it. I take it back though, I was able to get my project file _reads_ to happen concurrently with buffered SD playback using a non-blocking main loop approach, but as far as writes go, even in 512 byte sized chunks, it seems it pretty much halts the SD card and the SD buffered audio stops...
  29. G

    Attempting non-blocking concurrent SD read/write access

    I was discussing the topic of reading/writing project data structures from the SD card while at the same time playing audio files which are buffered from the SD card in this thread. I am able to do non-blocking reads of other project data from the SD card while the SD buffered audio is playing...
  30. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Nevermind, I figured out that I just needed to implement non-blocking buffered SD reads/writes from the main loop. Before, I was just doing large blocking read/write calls, and then I was trying to do buffered read/writes from within a while loop while the files remained open (which I didn't...
  31. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Thanks for all your help! Would you prefer I start a new thread about the concurrent playback + SD card access? I’m trying to read/write my custom data structures in chunks to the SD card while the buffered audio is playing and I can’t seem to get past it hanging.
  32. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Another question: I've noticed severe lag / program failure when trying to read/write from the SD card while these AudioPlaySdResmp are playing, which makes sense if the SD card is busy streaming audio files. Is there a simple way to set a flag to block the audio buffering from the SD card while...
  33. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Alright, I fixed the sketch. I was being sloppy before. Updated sketch here. Very cool that this works! I will have to try and benchmark this approach for my project to see if offers better timing / value, because I could see myself coming back to this a bit later and being confused on how it...
  34. G

    changing pitch of audio samples - TeensyVariablePlayback library

    @h4yn0nnym0u5e I have a few lingering questions as well: 1. What does adjusting the RESAMPLE_BUFFER_COUNT actually affect? I'm curious if I should be increasing this value since I'm opening lots of files concurrently given the multi-track sample playback. What are the benefits/penalties if I...
  35. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Welp, here's the best I have so far, but I think either it just doesn't work or I'm doing it wrong somewhere. At best I sometimes hear flashes of sounds, so maybe there's a bug in my sketch. https://gist.github.com/grayxr/b2788c3c3e10f6dae6234c517426b5f9
  36. G

    changing pitch of audio samples - TeensyVariablePlayback library

    @h4yn0nnym0u5e in regards to the slow playback start and the click sound -- on my end these are a million times better! I don't hear a click sound at all. I also took your advice and put my sample folder at the top level, and that plus your other changes seem to be working out very well timing...
  37. G

    changing pitch of audio samples - TeensyVariablePlayback library

    I agree with your prioritization, and thank you so much for dedicating time to this! I've switched from using SW SPI to HW SPI for talking to the OLED display, and it is way faster, and this basically eliminated the stuttering in the audio / main loop code, so if you'd like to deprioritize the...
  38. G

    changing pitch of audio samples - TeensyVariablePlayback library

    This is repeatable. I hear this click at the end with a specific kick drum wav sample. https://gist.github.com/grayxr/3ca01ce5db5761a499ba554b4be84b0e (using the BD.WAV sample from the google drive link I shared above) demonstrates it. Careful, I set the sketch volume high so it's audible, but...
  39. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Seems like if the buffered WAV file playback is going to be in my main loop, I have to figure out how to use the SSD1309 OLED with the u8g2 library in such a way that is non-blocking, because I think the SPI communication to the OLED is what is the main issue. EDIT: Sorry, I didn’t fully grasp...
  40. G

    changing pitch of audio samples - TeensyVariablePlayback library

    So I made a revision to the original sketch to try and use uClock. It works because I have a separate crude data structure tracking the trigger events, and then I'm scanning for them and firing them in the main loop. It works decently for this example, and I was able to overhaul my groovebox...
  41. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Yeah with having to sacrifice all of the PSRAM for caching samples freed up now, I can probably move all of my project files into PSRAM during a play session, rather than how I have it now which is to read/write project data to the SD card in between pattern changes in order to save on memory...
  42. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Ok, that makes sense. But now that I know that the Teensy Variable Playback changes don't require the Teensy Audio library changes, I am wondering if the Teensy Variable Playback changes are/can be easily interrupt safe, specifically playing AudioPlaySdResmp files from within an interrupt from...
  43. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Sorry, my thoughts keep pouring in instead of altogether at once. First, thank you so much again, really inspired by this progress. I was kind of dreading the current state of sampling on my box, and now I'm looking forward to seeing how far I can push this. I hope you don't mind, I still have...
  44. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Though, with lowering the RESAMPLE_BUFFER_SAMPLE_SIZE to 512 it seems better playback wise and I haven't encountered a crash yet, less slop between various samples firing at the same time vs. when I had it at 2048. I think I could even get away with not having to use 32 playback objects maybe...
  45. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Ok, yeah not surprising about the buffer size issue, I was wondering if that might be it. Also interesting is that the two patterns it cycles through switch the track assignments so that the sample voices are already swapping between different samples every time a pattern change occurs without...
  46. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Thanks @h4yn0nnym0u5e and I was also thinking if the specifics of the WAV parsing are a hangup, we could work with RAW files instead. I know WAV is more user-friendly, but I'm not really planning on having stereo sample support at first, and I was thinking of making a companion desktop app that...
  47. G

    changing pitch of audio samples - TeensyVariablePlayback library

    @h4yn0nnym0u5e here's a sketch I made. Don't want to post it inline here in the forum since the formatting is not super great. Here is a google drive link to the samples I'm using if you want to run it. I haven't messed around with any pitch variation or anything, but surprisingly I'm able to...
  48. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Alright, I'll give it a shot with a small Arduino sketch prototype, I've been needing to solder together another Teensy anyway. Yes, any direction I end up going in with the sample playback, I will want to be using that clock library which uses interrupts, so I hope that doesn't discourage you...
  49. G

    changing pitch of audio samples - TeensyVariablePlayback library

    @h4yn0nnym0u5e I think there's a couple things giving me pause after thinking about it. Sure, I'm sacrificing 16MB of PSRAM primarily for samples / sample swap, which seems kinda sad, but the benefits of having instant playback with Nic's libraries seems pretty critical for my use case oriented...
  50. G

    changing pitch of audio samples - TeensyVariablePlayback library

    Sorry for resurrecting this thread, but I just wanted to describe how I'm managing samples for my groovebox so far: I have the Teensy 4.1 fitted with 16MB of PSRAM, and I've been using Nic's teensy-variable-playback library in conjunction with his other teensy-sample-flashloader library to load...
Back
Top