-
Moving on
07/09/2020 at 23:15 • 0 commentsPre-lockdown, I managed to get this version of the controller out together and, while it worked, it wasn't as usable as I wanted it to be.
Recently I've been using Pure Data to create patches for another project, and it has now given me a new angle from which to approach this project.
I will recycle the Arduino Mega code to read the inputs, but instead of using those to fire off serial commands to various mp3 modules I will send an array of the values to a Pure Data patch via serial.
In my testing I have been able to load some sample wavs and trigger them from the Arduino data, which is awesome! Next up is to try and use that passed value as the velocity of each hit.
Once I'm happy with that side of things I will look to provide data going back to the Arduino to display on an LCD screen, and look to incorporate some options for switching banks of wav files.
Finally, once I'm happy with this on my laptop I will migrate it to a Pi with a Justboom amp/DAC hat. I'm also going to try running it on an old windows 8 tablet to get use out of some things gathering dust. If I manage I will ditch the LCD screen and incorporate a GUI in the Pure Data patch.
-
Code | Rough, but almost ready
08/30/2019 at 00:20 • 2 comments'Done Compiling'
Two beautiful words I love to see after attacking the Arduino IDE for a little while:
I've added some missing functions to the code, and now have something I'd be happy to test the hardware once assembled.
The code will:
Read analog inputs
Allow volume and bank control from encoder
Show on screen volume and bank data
Trigger sounds on the sound modules
In future revisions I will work on adding EEPROM into the code to save settings, arrays to save various settings for each pad input (volume, target sound module to start) to save into EEPROM, and update the menu to show more levels. Perhaps pressing and holding the button then allows the user to switch to a pad select mode (scrolling will move the pages between each pad) then clicking will allow to move between settings for the pad, with a further click allowing to select the value to be edited. One last click would save the changed setting, whereas holding would go back to the main menu.
In addition to this I will almost certainly include a series of Serial commands to allow for the settings to be updated via serial.
-
New Github Repo
08/27/2019 at 00:09 • 0 commentsI've added a new Github Repo the the links of this page.
So far the code contains a simple menu, sets up the 8 analog inputs, sets up the 4 DFPlayer minis.
Next step is to add code to read pads and trigger sounds (I have that in another project somewhere), add EEPROM functionality to save each analog pin's sound and Player target, then improve the menu.
-
Software Possibilities
08/23/2019 at 00:43 • 0 commentsI've just been updating the project details to reflect my change of plan towards multiple sound modules firnthis project.
Following this decision I have realised it has opened up the possibility of more feature in the software.
The first is individual mapping for the pads: rather than dictating a sound bank number across all of lads i could allow the user to assign different numbers to each pad. I could also allow the player to edit the routing of the pads, and chose which DFplayer module is triggered by the pad.
In order to achieve this I am going to create an array for each analog pin which will be saved to EEPROM. The pad will have the analog pin number, the dfplayer's tx pin number, file number.
I can add to the screen menu to allow the encoder button to cycle through the pads when clicked, and pressing and holding would enter 'edit mode'. I'd also like to write a function to allow for updating of the settings via serial, so I can write a companion python app with a GUI for easy editing.
If anyone has any good examples or experience with arrays and EEPROM stiff please leave a comment :)
-
Almost ready to build!
08/21/2019 at 16:19 • 0 commentsToday I have taken delivery of the lovely little enclosure that is going to house this project, along with the 10k stereo pots required to control outputs of the sound modules in the DIY mixer part of my plan. Once the stereo jack sockets arrive I'll be building this unit, testing it, then giving it to our drummer for feedback in order to fine tune the code.
The Arduino will be reading the pad inputs and the volume/sound bank encoder, as well as outputting to the LCD screen and outputting serial to the four sound modules.
The sound modules will then play the requested sound files via a Left and Right output. In order to mix these four left and four right outputs into one main left and right out voltage dividers must be used to avoid adding too much noise to the output. My voltage dividers will be made up of 1k resistors and 10k potentiometers, which will allow variable control of the pad outputs. In order to keep the interface clean I am using stereo pots instead of single pots to a)reduce the number of knobs on the interface and b) maintain even control of both L&R outputs of each sound module.
Here's a shot of the enclosure and all the parts, except for the panelmount usb cable and the audio jacks:
-
Delivery!
08/06/2019 at 00:20 • 0 commentsReceived 5 x DFplayer mp3 boards today :)
Over the next few days I'm going to pick up for 512mb micro sd cards for them and then build my new breadboard up.
Code-wise for the screen and encoder nothing will change, but for the pad control I will need to initialize 4 software serial ports for the fkur boards, and the main loop will need to loop through the analog pins and send any read hits to that pad's dedicated player.
If it turns out that this is complete overkill i always just use two mp3 boards, queue the registered hits, poll the status of the mp3 boards and pass to the next available.
For testing purpose I'm going to connect all of the mp3 boards outputs together with 10k resistors, but in the final case I may include potentiometers to allow the user to mix pad strength.
-
Oooooh, a polyphonic library??!!!!
08/01/2019 at 13:41 • 0 commentsStumbled across this today;
https://github.com/TMRh20/TMRpcm
It allows asynchronous playback, and supports multiple files being triggered at once.
It uses Pin 9 as the speaker pin - if this is compatible with the MP3 Shield I have for the Mo-based board then that would be awesome!
-
The Quest for Polyphony
07/29/2019 at 23:21 • 0 commentsBack from a family holiday, I'm really looking forward to testing out some ideas on this project.
One thing I require is to either have polyphonic output to allow the pads to trigger simultaneous sounds, or at the very least simulate it to the human ear.
I've written several test code scripts for the Arduino board and shield I had in mind for this, but find that I can't really get close to the effect I had in mind. More likely to be my execution rather than the board itself.
Before I went on holiday I threw together a quick novelty project at work; an ESP8266-based webserver to allow triggering of soundclips in the office (all for the proverbial shits and giggles :-D ). This project used the DFRobot mp3 board, and it was a doddle; controlled via software serial and complete with an arduino library, the thing worked great. Also, it was really cheap!
I'm going to order a few of these boards to test an idea - if it works, great, if not I'm sure the boards will work their way into other projects ha ha!
The plan is to add two or more of these mp3 players into the project, with an arduino or ESP8266 reading the pads and connected to the players, and a DIY mixer to blend the outputs of the players.
Two strategies - one would be to check whether the first board is busy playing a sound file and send the request to the next available board. The other would be just having a player per pad. There's only 4 pads so 4 players would be doable.
If the multiple players work together then this will be great for the project. The only drawback would be the need for multiple SD cards but, once the sounds are added to them this shouldn't pose an issue.
-
Better boards for the task?
06/26/2019 at 23:56 • 0 commentsSo far the project is 2/3 worked out; my menu and GUI is all working, I know how to read my pads via analog pins, but in Just need to get playback working well with the M0 board.
Tonight I have been trying to make progress on playback, using a serial input to trigger wav files to be played from the SD card, but at the minute it plays garbled sounds. I'm hoping to track down where I've gone wrong sooner rather than later, as I'd like to get this working for our drummer soon.
I've started to have a few doubts as to whether I am going to be able to achieve the level of performance I would like to get from this board, and have wondered if i could achieve better results with a different board?
My options:
Pi - easy shout, this one. Wav player could be written in Pygame, can use the encoder and LCD display as planned. I'd need to pair it with a microcontroller to accommodate it's lack of Analog pins.
PCDuino - I have an old v1 in a drawer which could work. Should be able to handle Python and Pygame plan no problem, plus has Arduino compatible pins for piezo reading.
Intel Edison/Galileo - I have these boards gathering dust somewhere, just screaming out to be used in a project.
I've never used them before so set up may be tricky, but their arduino compatible pins and their running of Yocto Linux could be of advantage.
I'm open to thoughts - post a comment and let me know your views!
-
Menu Test complete
06/06/2019 at 23:49 • 1 commentApologies for the slow updates everyone, I've been having a bit of a difficult time getting stick into projects at the moment.
Today I have tested the setup for menu, using a Wemos Mega + WIFI board, i2c LCD, some push buttons and the dfrobot mp3player unit.
The menu is simple, butndoes all itllnever need to do. Clicking the rotary encoder button selects either Bank or Volume on the menu and rotating it will adjust the relevant variable.
Next I'd like to solder up a small board with the jack sockets in it, alongside the screen and encoder. This'll keep the in case set up nice and neat.