
audiocommander
Frequent Writer-
Posts
1,358 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Gallery
Everything posted by audiocommander
-
how to Reset PIC chip without resetting bootstrap!?
audiocommander replied to SynnyS's topic in Testing/Troubleshooting
every project has a main.syx file. even your own application has a main.syx file if you didn't change the default name. mios itself is called "mios_v1_9_pic18f452.hex" or "mios_v1_9_update_without_installed_mios.hex" or ... so you couldn't have uploaded mios, 'cause it's definitely not called main.syx. please take a look at http://www.midibox.org/dokuwiki/doku.php?id=application_development to see what is called MIOS and what is called an application ;) Regards, Michael -
Hi analogbrotha, might be best to look to the wiki, there are some great introduction-articles, esp. in the basic and general section the application-development pages is a lot going on too, there are tutorials, links to installers and step-by-step instructions... just look around a bit ;) Cheers, Michael
-
Can I toggle controls with boolen operators?
audiocommander replied to henrygr's topic in MIOS programming (C)
Mark, that means, that your pin-numbers don't match. please look back some postings and add that line to send the pin via midi message. If you are using an AIN-module connected to the core, I doubt you can then use the remaining AIN-pins of J5, because the core is in muxed mode. Not sure, though However, have you set [tt]MIOS_AIN_Muxed() [/tt](need that if you have any AIN-board) and [tt]MIOS_AIN_NumberSet(maximum pot number)[/tt]; // in your case 26? in the init() section of your code! Please don't open up another battlefield (banksticks) while struggling with this one, it brings only more confusion. Don't call any system resets unless you have a pretty good reason to do so. Cheers, Michael -
Hello everyone... I'm trying to convert 12bit decimal numbers to single ascii chars and stumbled over this quite helpful mios function MIOS_HLP_Dec2BCD(unsigned int value)... However, the numbers generated from MIOS seem to be others than I would expect following the descriptions. My AC-Sim debugger produces the right numbers (I implemented a function that does exactly what I would MIOS expect to do: 12345 => 0x1, 0x23, 0x45 in MIOS_PARAMETER3, -2 and -1): // from the debug_mios.c file that simulates MIOS extern void MIOS_HLP_Dec2BCD(unsigned int value) { // decimals to hex (eg 123456 to 0x12, 0x34, 0x56) unsigned char a; unsigned char b; // get 100.000 a = (unsigned char)(value / 100000); b = (unsigned char)((value / 10000) - (a * 10)); MIOS_PARAMETER3 = (a << 4) + b; // get 1.000 value = value - (a * 100000 + b * 10000); a = (unsigned char)(value / 1000); b = (unsigned char)((value / 100) - (a * 10)); MIOS_PARAMETER2 = (a << 4) + b; // get 10 value = value - (a * 1000 + b * 100); a = (unsigned char)(value / 10); b = (unsigned char)(value - (a * 10)); MIOS_PARAMETER1 = (a << 4) + b; } I tried to debug this with MIOSStudio, but I don't know where to find MIOS_PARAMETER1 to -3 (tried to read RAM from 0x0 to 0x0f, but couldn't get anything back :-[ ) before I have to rewrite an asm-optimized custum function (huh, I'm an ASM-Idiot), I try the forum, maybe anyone knows a hint for me? google has way too much unrelated search resuls and I can't believe it would take so much complicated code to do a dec2BCD-conversion ??? This is the relevant code so far: (input 0..127 => 0..4064 (12bit) => '0'..'4','0','6','4') ...just produces unordered garbage numbers in the range from 0 to 8149 #define NUM2ASCII(num) (num + 0x30) unsigned char IIC_SPEAKJET_Transmit12bit(unsigned short value) __wparam { unsigned char c; unsigned char result = 0; MIOS_HLP_Dec2BCD(value); /* // skipping param3: hundret-thousands c = MIOS_PARAMETER3 >> 4; if(c > 0) { result = IIC_SPEAKJET_TransmitByte( NUM2ASCII(c) ); } // param3: ten-thousands c = MIOS_PARAMETER3 & 0x0F; if((c > 0) || result) { result = IIC_SPEAKJET_TransmitByte( NUM2ASCII(c) ); } */ // param2: thousands c = MIOS_PARAMETER2 >> 4; if(c > 0) { result = IIC_SPEAKJET_TransmitByte( NUM2ASCII(c) ); } // param2: hundrets c = MIOS_PARAMETER2 & 0x0F; if((c > 0) || result) { result = IIC_SPEAKJET_TransmitByte( NUM2ASCII(c) ); } // param1: tens c = MIOS_PARAMETER1 >> 4; if((c > 0) || result) { result = IIC_SPEAKJET_TransmitByte( NUM2ASCII(c) ); } // param2: ones c = MIOS_PARAMETER1 & 0x0F; result = IIC_SPEAKJET_TransmitByte( NUM2ASCII(c) ); // also transmit '0' return result; } void IIC_SPEAKJET_OSCFreq(unsigned char osc, unsigned short value, unsigned char valueIs14bit) __wparam { // osc = 1..5, value = 0..16383 or 0..127 unsigned short value12bit; if(valueIs14bit) { value12bit = value; } else { // value is 0..127, SCP_FREQ_MAX is 3999 value12bit = value << 5; // 0..4064 (12 bit) } IIC_SPEAKJET_TransmitStart(0); // write frequency to register IIC_SPEAKJET_Transmit12bit(value12bit); IIC_SPEAKJET_TransmitByte(SCP_MEMWRT); IIC_SPEAKJET_TransmitStop(); } thanksalot, Michael ;)
-
haha... :D that's been a nice joke :( sorry about my sarcasm, but I'm just sooooo bored waiting for one-and-half-a-year for a PRG-CH bug-fix of Absynth3. There is a reason, why you have to register to gain access to the NI-support forums. NI has great software-tools... and an even greater copy-protection (I tend to call it "customer-protection"), but IMHO a bit overpriced and buggy enough to be a pain in the ar*e when you have to rely on it live on stage. If you're in a (home)studio, it's okay; if you're doing live-music with a professional demand, it's not recommendable... I know my opinion comes late, but haven't read this thread before... maybe you are luckier than me, 'cause KORE seems to be the biggest product since quite some time now... Regards, Michael
-
http://www.galileocomputing.de/openbook/c_von_a_bis_z/c_011_007.htm ;)
-
versuch's mal mit [tt]taster[pin] [/tt]statt [tt]taster[20][/tt] ...und lass mal das [tt]static[/tt] weg, denn so weit ich weiß (hallo C-Buch :) ) müssen static-variablen bei der deklaration gleich definiert werden (was bei 50 werten aber vielleicht ein wenig zu tipp-intensiv ist ;) ) (ansonsten sieht das doch schon ganz gut aus ;) ) grüße, Michael
-
Can I toggle controls with boolen operators?
audiocommander replied to henrygr's topic in MIOS programming (C)
Hi Mark :) so is it working or not? (sorry if I'm slow on the uptake, but I can't find the question out of your last postings :-\ except this one: But I don't understand this either: do you only get the default-case-section? But if you remove it, you shouldn't get anything else... somehow this doesn't make sense... ??? The switch executes only the [tt]case[/tt] of the relevant [tt]pin[/tt] until the [tt]break; [/tt]then it leaves the switch routine. (anyone else, maybe?) Regards, Michael -
Can I toggle controls with boolen operators?
audiocommander replied to henrygr's topic in MIOS programming (C)
hmm, so I don't understand the problem ??? I think there's still one basic misunderstanding: - What do you want to happen when pressing pin 1/2/3 of your switch? - what are the numbers of the AIN pins where you connected to your switch? if you answer these two questions, I'll code the relevant lines for you to shorten this... ;) Cheers, Michael -
hrm, hhh :-\ sorry having to stab you in the back, mate; if you ever printed a page from safari, you know how wonderful this can be from a well-thought and planned browser (nearly the same applies for ff). I don't think it should be in the programmer's field to think about printability on a screen-optimized media (although I don't like frames, but Safari f.ex. has the option to print "the biggest frame only")... I've been calm 'cause I know my addiction to M$ flame wars (;D), but I've seen friends of mine catching a worm from the internet 20 minutes after a fresh install, just by searching a virus protection software with IE ;D ;D But the worst thing, that pis*es me really, is the behaviour of M$: Billy and his crew are fully aware of the W3C defined standards but they ignore them willingly and add proprietary visible features just to push out competitors, because 50% of all webdesigners will then optimize their code for M$IE and 75% of all webusers will then say: 'bah! this won't work with FF', because they don't know that all (okay: most) browsers work with standards, just IE is ignoring them. This is not about 'this software is better than that', it's about defining standards for effective informational intercommunication (it's the same with openDoc or rtf and MS.doc-format). That's why I'm getting really angry about that, because it's nothing than a purblind dumb behavior about gaining maximum money against visions of free informational flow >:( So IMHradicalO: if it doesn't work in IE, switch ya browser (at least if it's no critical section such as a menu or something...) cheers, ;) Michael (and stryd_, I like you even if you're browsing with IE :-*)
-
Can I toggle controls with boolen operators?
audiocommander replied to henrygr's topic in MIOS programming (C)
hey, please check my hint with the LCD! :) -
how to Reset PIC chip without resetting bootstrap!?
audiocommander replied to SynnyS's topic in Testing/Troubleshooting
MIOS is separated into 2 different bootstrap-loaders, the first one is burnet into the chip, and the second one is part of MIOS and active for about 2 seconds (when you see the copyright message). If you send another appliction (eg one c-app of the download section) in these two seconds by SysEx, you'll have a shiny new program on the chip :) Alternatively you could upload MIOS itself again, but that would be a bit of an overkill if MIOS itself isn't damaged. ;) Test with one of the default applications (from the download-section)! If everything works as expected (AINs & DINs sending signals and so on...) you'll know for sure if it's the hard- or the software. Yes there is: 1. Look to the Wiki. In the part "application development" is a link to a C-Debugger (called AC-Sim) class. If you develop your C-project in an Integrated Development Enviroment (IDE), you can easily attach another target and test your application in a graphical debugger or check MIOS Output from a command-line utility. This is a bit of work in the beginning, but it's worth gold if you struggle with some unknown contents of your variables. 2. Check out MIOSStudio. It has a Debug-Interface, where you can stop the User_Timer and call different MIOS-function (unfortunately just MIOS-handlers, not your own). You can also dump the RAM of the PIC. If you're smart enough (I'm not ;D) you can see the contents of your variables there :) MIOS and MBHP are a great platform, but I found it difficult in the past having too less time to experiment and try out things. A Microcontroller sometimes behaves differently than a PC and programming has to be more precise and effective... Take yourself a bit more time with the next project and you'll surely have more fun :) Best regards, Michael EDIT: some overlaps with stryd_one, but I'm sure, anyone can live with it... (hey stryd_one... you're the second time faster than me :( I think I'm going to take a coffe break and wait for you finished your forum walkthrough ;D ) -
Can I toggle controls with boolen operators?
audiocommander replied to henrygr's topic in MIOS programming (C)
sorry, I've been a bit confusing, of course I meant "AIN board" :) the thing is: if you check pin 24 to 26 and only "default" is being called, that means, that you get no signal on pins 24 to 26. On previous postings you used pin 0 - pin 3 and it worked, I don't know how you changed your wiring... but the syntax of the switch case is now correct ;) you have to write "case 24:" if your pin is connected to pin 24 (=25 of AIN if you count from 1). you may add a debug line just below the beginning of the function: MIOS_LCD_PrintBCD2(pin); Then the currently active pin will be printed to your LCD and you know how to address your "case" right ;) Cheers, Michael ps: I don't think there is need for you to build a DIN-module. Just find the right numbers for your three pins ;) -
Can I toggle controls with boolen operators?
audiocommander replied to henrygr's topic in MIOS programming (C)
hello henrygr :) As I still assume you still don't have no DIN-Board and instead soldered your switch directly to the core, it is very unlikely you'll ever get a notification for pins 24 to 26 (=pins 25 to 27 from the DIN-board, if you count from 1). You should instead receive notifications for pins 0,1 and 2 (if I remember right) best ;) Michael -
Mike has MBHP_Burner PCB's, the parts are quite inexpensive and after I found out that cheap PSU's deliver sometimes more than 12V, this has taken me one or two hours and maybe 5 to 10 eur :) (I think I've also seen a breadboard plan flying around somewhere here...) And I had to burn more than twice with the JDM before the PICs were okay, and it took such a long time (1%..2%..2.5%... ..and..so..on..89%.. ERROR!). Witch MBHP_Burner it's Chip-in, press-burn, Chip-out, done :) Cheers, Michael
-
besides the fact, that I'd say it's really more fun burning with the new MBHP_Burner (and if I'm burning once in 6 months that's a lot!), I'd guess the software is the bottleneck. I think, there are compatibility reasons (maybe with special required voltages), why you have to use: - P18 for PIC18F on MBHP_Burner - PBurner for PIC16F on MBHP_Burner - JDMBurner for PIC18F on JDM_Burner You could check if JDMBurner supports that PIC16F-Type, if it does and the voltages match, I'd try it (or wait until someone replies who knows it for sure ;) ) Cheers, Michael
-
trouble compiling c application (update)
audiocommander replied to mess's topic in Testing/Troubleshooting
Hi Michaël, it seems to me, that the cd to your working directory hasn't been recognized properly, or maybe SDCC srewed up, because it didn't expected to be installed on E:\ but to compile on Z:\? I know SDCC supports installations in other folders than the default one, but I'm not sure it can also be installed on other than the system's partition? Do you know if that's supported for your installed SDCC version? (I expect your girlfriends computer just has C:\ ;D) I would try moving your project (or better: a fresh ClockBox-Example) to E:\ and try if it compiles from this partition... Regards, Michael -
I have to aks about that, because I belive CC is a great thing and I also often use this type of license, esp. on the code-snippets I uploaded on the Wiki (BY-NC-SA, which means: name the name, non-commercial, share as you like - incl. right to change or alter, but then under the same conditions). And although it has only 6 letters, it should have juristical success if it would ever come to some sort of trial... What type of license would you wish to see instead (esp. for contributions to the community)? Cheers, ;) Michael
-
Speakjet - A PIC ready sound chip?
audiocommander replied to herr_prof's topic in MIDIbox User Projects
Hi Justin, nice to hear that you're in, too :D if you can wait a few days, you get even more... currently I can mix MSA (pitch, bend, speed, allophones, soundfx, phrases, pauses...) and SCP controls (ENV/OSC), convert 12bit values to single char string patterns and it works really well... I just want to implement a rough phrase storage. I need this thing in a first version by the end of next week, so you can be sure I am putting some code to the wiki until then :) That's by far not all that I want to do (hrm, maybe it's got to do with frequencies & harmonics? :-X), but enough for a first version and quick pre-release... Promised! Cheers, Michael ps: the lowPass filter has one side-effect: it makes the whole thing very silent. I am trying to get a fully battery operated speakJet along with a soundbug (http://www.soundbug.biz/) and had to solder an additional output that bypasses the low-pass section. Now I can choose wether to take the silent hi-quality or the loud low-quality pin :) -
there's a midi-sofa (you'll find it easily by searching the forum), that controls a pong-game and I've built a "Kontaktstation", that translates skin-contact between two (or more) people to music (see the Wiki -> userpages -> audiocommander)... but that's to do with music :9 I can also remember, there's a wind-controlled midibox around here... the new speakjet-synthesizer module will be quite exotic, too... but also music related and it's a work in progress, not yet done... I'm sure, there are more exotic projects! It would be nice, if you keep us informed :) Cheers, Michael ;)
-
the mentioned joysticks from conrad should be in fact two linear 10k pots, perfectly suited for MBHP (please check again before buying!) :)
-
if you're using LIVE, you first had to assign your MIDI message to something. I don't know to what function you assigned the pitchBend, but it may be that you send 14-bit pitchwheel but receive (in Live) only 7bit (PitchWheel MSB/LSB)? Make sure that you send and receive the same message type with corresponding value numbers! Please see here: http://www.midibox.org/dokuwiki/doku.php?id=midi_specification (follow the links, take a look at the charts, esp. Channel Controllers and PitchWheelChange!) the links from midi.org give a quick and exact overview, the links from borg.com provide some background infos and programming examples... Michael ;)
-
don't worry analofbrotha, I think TK refers to another thread ;D cheers, Michael (and I'd also recommend Encoders rather than Pots ;) )
-
Building a std MIDI mixer [eg. TDS Controller]
audiocommander replied to tos's topic in MIDIbox HUIs
you can use a Y-cable, but you will loose some signal. I'd test it first; I use some Y-cables/patchbay for splitting signals with acceptable results. However, there are active splitters available in music shops (quite expensive, but I'm pretty sure there are some DIY resources as well), that help to keep your audio signal well ;) I think so. If you are lucky, you might use J14 that's used (and MIOS-prepared!) for touch-detection for the motorFader-module. Maybe you'll find more infos on the MF-page; I saw some excessive infos (schematics, measurements, curves...) from TK here in the forum. But it should be also no problem to build a touch-switch that uses a DIN-pin. Cheers, Michael