Calphool Posted October 6, 2008 Report Share Posted October 6, 2008 I recently purchased a core kit from SmashTV, and I located a nice 20X4 blue background CLCD on eBay. I spent a couple of hours yesterday soldering everything together, half expecting the whole thing to fry the minute I plugged it in... imagine my surprise when it worked the first time... plugged it in, up popped the little MIOS splash screen on the CLCD followed by "Ready."So now comes the fun part... software... so here's my situation. Hopefully some of you wise midibox sages out there can help point me in the right direction.So I've got an old Roland JX-8P that's still a nice synth, even if it is early 80s tech. I've also got a nice new Roland Juno-G. They don't completely play well together, mostly because the JX-8P is pre-General Midi, and it has an odd idea of where middle C should be (it's an octave low relative to my Juno, and pretty much every other modern Midi device). So, what I want to do with this little core box is:1) Build a transpose module such that midi note-ons and note-offs are transposed up or down a given number of half steps (probably with a DIP switch or a rotary to set the transposition) from the IN to the OUT midi ports.2) Optionally turn on a kind of "GM to JX-8P" switch that will take incoming patch/bank changes from the Juno and alter them so they match the closet patch on the JX-8P. In effect, it would be making the JX-8P somewhat GM aware.Then, some day, for a later project, I would really like to try to build a PG-800 programmer like this one: http://www.vintagesynth.com/roland/pgs.shtml for my JX-8P. They go for well over $300 on ebay, and it seems likely that one could be built for far less than that. They already have software versions of the PG-800 that run over the midi port, so it should be similar... I'd just need to determine what the sysex messages look like that the PG-800 emulator kicks out.Hey, another question: What's the best way to provide a lot of storage for one of these cores? Is it the bank sticks? The JX-8P has a cartridge that can be programmed by sysex commands to store patches. It would be pretty cool to have a little core box with thousands of patches stored somewhere that you could just dial up and load into the cartridge on command. It would breath new life into my dusty ol' JX-8P.... it would be even cooler if you could tell it to randomly dial up a patch by choosing arbitrary values for all the programmer parameters.Thanks for any guidance anyone chooses to offer me. I'd really like some comments on my first project (the transposing patch monitor thing). What should I expect to run into? Should it be easy or hard? Any advice would be greatly appreciated.Thanks!--Calphool Quote Link to comment Share on other sites More sharing options...
audiocommander Posted October 6, 2008 Report Share Posted October 6, 2008 Hi Calphool,and welcome to the forums!when I understand your questions correctly, you want to know- the protocol of the PG-800?-> just search for it. A quick type in google revealed lots of pages that should be able to answer this (eg http://www.synthesizer.at/synthesizer/jx8p/roland_jx8p.htm#24 )Also: get yourself a MIDI logger to log what MIDI values you receive: eg. MIDI-Ox (PC) or MIDIMonitor or MIDIPipe (Mac)- if a BS is the best way to store patches?yes. it is.as I couldn't find any obvious relation to C, I allowed myself to move your post to the concepts threads.Best,Michael Quote Link to comment Share on other sites More sharing options...
Calphool Posted October 7, 2008 Author Report Share Posted October 7, 2008 Thanks. Actually, I think I should just focus on one project at a time. (Sorry, I'm always getting ahead of myself...) I'm going to leave the "PG-800 programmer" and the "JP-8X to GM" converter application until later... the easiest project to start with will be the transposer I think.So all I need to do is write code that will transpose incoming Note On and Note Off messages based on a transposition register value in the PIC. The register value can be incremented or decremented in half steps by pressing an up or down button. When the up or down button is pressed, I need to issue an "All Notes Off" command so that no stragglers are left playing (since we've transposed them, if we didn't send an "All Notes Off", we'd have stuck notes that never received a Note Off command if I didn't send an "All Notes Off").Where do I start? Is there a "Hello World" C app somewhere that give me some baby steps to start with?Thanks!Calphool Quote Link to comment Share on other sites More sharing options...
audiocommander Posted October 7, 2008 Report Share Posted October 7, 2008 http://ucapps.de/mios_c.htmlhttp://www.midibox.org/dokuwiki/application_developmentDownload mios_base_package:http://ucapps.de/mios_download.html Quote Link to comment Share on other sites More sharing options...
Calphool Posted October 8, 2008 Author Report Share Posted October 8, 2008 Cool. Thanks for pointing me in that direction. So I've built the tool chain, and now I'm looking for a very simple "Hello World" type application that just runs on the CORE with a CLCD plugged in... an app that does something really simple, like displaying "Hello World" and then sending 3 Note On events, waits 5 seconds, and sends 3 Note Off events...I see lots of complex apps that do various things, but I just need something very simple so I can put all the pieces together and get used to using the tool chain and MIOS Studio. Does anybody have a simple project like that that you could share with me?Thanks,Calphool Quote Link to comment Share on other sites More sharing options...
audiocommander Posted October 8, 2008 Report Share Posted October 8, 2008 have you seen the snippets at the bottom of the ucapps/mios_c page?Best,Michael Quote Link to comment Share on other sites More sharing options...
Calphool Posted October 9, 2008 Author Report Share Posted October 9, 2008 Yeah. I kind of understand what those are doing... I decided to follow the tool chain links all the way to the end (including installing Code::Blocks), and now I think I've kind of got a handle on things, but I've hit a road block.So I set up the SDCC template as instructed, and I can build a HelloWorld sample application, and it even runs on the command line when I compile in Debug mode (under ACSim I think). However, when I switch to Release mode in order to create my .hex file with the SDCC compiler/linker, I get the following:-------------- Build: Release in HelloWorld ---------------Compiling: main.c'perl' is not recognized as an internal or external command,operable program or batch file.Assembling MIOS SDCC wrapper==========================================================================Compiling pic18f452.cat 1: warning 117: unknown compiler option '--fstack' ignored'perl' is not recognized as an internal or external command,operable program or batch file.ERROR!Process terminated with status 9009 (0 minutes, 1 seconds)0 errors, 0 warnings So I don't have something setup right, but I'm not sure what the problem is. It's complaining about "perl", but I don't remember doing a step that would have installed a perl interpretter. Help! Quote Link to comment Share on other sites More sharing options...
Calphool Posted October 9, 2008 Author Report Share Posted October 9, 2008 Ok, so I got past that problem... installed a perl interpretter.I messed around with the HelloWorld app and figured out how to load it to the core... I tell you what, that's pretty exciting!So now I have an SDCC question I think... do I have access to the ANSI C functions? For example, do I have access to the rand() function of stdlib.h? If so, I must have my linker misconfigured or something, because when I try to use rand() I get an error saying "error: missing definition for symbol "_rand", required by "_output\main.o""Any suggestions? Does SDCC not have the standard libraries? (Sort of scary if that's true, but not necessarily surprising, since we're trying to cram so much into such a tiny platform.) Quote Link to comment Share on other sites More sharing options...
stryd_one Posted October 9, 2008 Report Share Posted October 9, 2008 The perl error shouldn't happen - I think you've followed old documentation. The new toolchain doesn't use perl (well, not to build apps anyway. You shouldn't need it until much later, if at all) so maybe you've also installed an old template app.I'm unsure if ACSIM is working with the new toolchain...Can you point me to the doco you followed, so I can start on updating it? Sorry about that!!As for the ANSI functions, have a search around for 'SDCCLib'. You can add these functions at considerable code size expense. Quote Link to comment Share on other sites More sharing options...
Calphool Posted October 11, 2008 Author Report Share Posted October 11, 2008 Well, I pretty much just followed the links that were posted earlier in this thread. I paid special attention to the version numbers that were mentioned for each tool in the tool chain, so I'm guessing one or more of those is out of date. I know that on at least two of them I was using a version that was behind the current tip release.Thanks for your help everyone! Quote Link to comment Share on other sites More sharing options...
stryd_one Posted October 11, 2008 Report Share Posted October 11, 2008 Well, the application development page and the C page linked above, both point to the quickstart guide, which doesn't say anything about installing perl... and the C skeleton doesn't use perl either... So I think the problem is the code:blocks setup doco. I've confirmed that the skeleton there needs an update, as does the doco - they both use the old toolchain.There's a problem there - I'm very short on time lately and no longer using code:blocks. I think someone else will need to fix it up. Here's what needs to be done:Follow the quickstart guide. Install code:blocks. Download a fresh MIOS SDCC template (from ucapps.de mios_base package). Follow the instructions (in that doc) for creating a new project, but don't use "make.bat" - just "make". Zip up the resulting template and send to me for uploading to the doc. Honestly though, I don't think you're going to need ACSIM... So unless you're already a codeblocks user, I'd just go with notepad++ and the normal mios sdcc template.Let me know what you think, I'll give as much help as I'm able :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.