Ninjabba Posted October 19, 2011 Share Posted October 19, 2011 (edited) I've been following the topics on here for better sound effects on the Lynx, and I gotta admit, some great sounds can be generated using those tools! However, I haven't been able to integrate any of it in my project.. as a matter of fact, I haven't been able to create any kind of sound out of the machine. Its been on low priority for a long while. So I've been using the sketch template. With it comes abcmusic, which uses a simple notation for generating some tunes. I can't seem to get it to work though... I got something as follows int intro(void) { tgi_install(&lynxtgi); tgi_init(); CLI(); silence(); abcmusic(1,":A2GEcde>dcABGAGE/F/GA2GEcde>dcABGA3z::eae>deae>dcdefgf/g/ageae>deae>dcABGA3z:"); // channel and tune while(1) { /* some other stuff here*/ abc_update(); } } Apart from me not being able to make it work, I assume I cannot get those crazy cool sound effects that I heard from other tools with abcmusic? Edited October 19, 2011 by Ninjabba Quote Link to comment Share on other sites More sharing options...
matashen Posted October 21, 2011 Share Posted October 21, 2011 in you string you must first set the instrument, volume etc for example here the sound that make clicking dices in my game lynxopoly _dicemusic0 dc.b "O3X4I1V100T7R100H2K20" dc.b "zzddzzczzd" dc.b 0 the first line is the instrument setting sampo did a great job in space dance (Yastuna2) i asked him about the abcmusic and i got this help Noterna är CDEFGABcdefgab high note = low note ~ Pause z Lenght 2 3 4 Tempo T (0..255) Volym V (0..255) Start block |: Repetera : Basically you create an ASCII description of what you want to play. Like: tune = "CDEFG"; channel = 0; abcmusic(channel, tune); You can also mix in instrument commands like On = octave n=0..6 Xn = XOR taps n=0..511 In = integrate n=0..1 Vn = volume n=0..127 Tn = time n=0..255 Rn = ramp up (attack) n=0..127 Hn = hold n=0..255 Kn = kill sound (decay) n=0..127 To find good values for instruments use abccreator.o You can then write your own tune like: tune = "O1 X7 I0 V40 T22 R40 H2 K1 |:CCCE DDDG FFDD C4:" The sounds you can use are: CDEFGABcdefgab ~ - lower = - higher Length of a note can be extended by 2,3,4 |: = start of a chorus : = repeat chorus ' ' = spaces are ignored. They are not required anywhere. I added them for readability. The tune should end in character 0. You can run tunes on multiple sound channels simultaneously by calling abcmusic several times: silence(); abcmusic(0, tune0); abcmusic(1, tune1); abcmusic(2, tune2); abcmusic(3, tune3); Quote Link to comment Share on other sites More sharing options...
Ninjabba Posted October 22, 2011 Author Share Posted October 22, 2011 Hi matashen, thanks for the reply! Gives me a better understanding of the notation of the music. I've tried quite some things here using your description of setting up the instrument, volume, etc. but still I don't get any noise.. I read in another topic I need to set up some interruptors, but I thought these are setup by initializing lynxtgi (even though its a graphic driver) Quote Link to comment Share on other sites More sharing options...
matashen Posted October 22, 2011 Share Posted October 22, 2011 no, you must put update_music or abc_update (dont know how it calls in karris new cc65) in a routine that works like a metronome. VBL is a good thing to put it in. the lynx hardware keeps the music going on. Quote Link to comment Share on other sites More sharing options...
Ninjabba Posted October 23, 2011 Author Share Posted October 23, 2011 I've managed to generate some noise when calling the abc_update function in the VBL routine. However, after initializing VBL other things like the joystick aren't working anymore... I use install_irq(2, (int)&vbl) to setup the VBL counter which calls abc_update, but I'm also using tgi_install(&lynxtgi) and joy_install(&lynxjoy) to setup the screen and joypad. I read that lynxtgi sets up VBL and other interrupt handlers automatically, but I can't seem to have this working for a regular call to abc_update. Could it be that VBL is interfering other interrupters? void start_irqs(void) { init_irq(); install_irq(2, (int)&vbl); enable_irq(2); tgi_install(&lynxtgi); // This will activate the Lynx screen joy_install(&lynxjoy); // This will activate the Lynx joypad tgi_init(); CLI(); tgi_clear(); tgi_setpalette(pal); } Quote Link to comment Share on other sites More sharing options...
matashen Posted October 23, 2011 Share Posted October 23, 2011 oh, seems to be only a problem with karris compiler - sorry i dont know about - please ask karri, he creates the abc routines and the cc65 compiler. I think he knows the answer about. If you have a solution please post it. Quote Link to comment Share on other sites More sharing options...
Ninjabba Posted November 4, 2011 Author Share Posted November 4, 2011 It seems to be a problem with the abcmusic version I'm using. Its written in assembly so I have no idea how to work around this. Karri replied to me he might have a C version that could work in my project, but looks like he's a bit busy lately since I haven't heard from him since then. When its figured out I'll post a small working project with music integrated. Hopefully soon, because I think I have something interesting to show the people on here once I have some sounds integrated In the main time I can only ask: does someone have some sound library that would work with the latest cc65 compiler? Thanks! Quote Link to comment Share on other sites More sharing options...
sage Posted November 4, 2011 Share Posted November 4, 2011 In the main time I can only ask: does someone have some sound library that would work with the latest cc65 compiler? Only a resource hungry modplayer. And a simple effect player. For sound player you have to stick to assembler. Quote Link to comment Share on other sites More sharing options...
Ninjabba Posted November 5, 2011 Author Share Posted November 5, 2011 In the main time I can only ask: does someone have some sound library that would work with the latest cc65 compiler? Only a resource hungry modplayer. And a simple effect player. For sound player you have to stick to assembler. I guess thats worth checking out. Could you maybe link me to them? My assembly skills are really poor, thats why I try to get around it.. Thanks! Quote Link to comment Share on other sites More sharing options...
sage Posted November 5, 2011 Share Posted November 5, 2011 I guess thats worth checking out. Could you maybe link me to them? My assembly skills are really poor, thats why I try to get around it.. well i can give you a workign example, but as soon as you want to change things, you may need at least the ability to change the adresses in the assmbler code... well were you find it... just have a guess... Quote Link to comment Share on other sites More sharing options...
Ninjabba Posted November 6, 2011 Author Share Posted November 6, 2011 hehe yeah that was a redundant question. I'm gonna experiment with those sources Quote Link to comment Share on other sites More sharing options...
Turbo Laser Lynx Posted November 21, 2011 Share Posted November 21, 2011 Ninjabba are you using the old newcc65 or the newer newcc65? The abc-notes sent to Matashen are my old notes for the older abc-music in the older newcc65. Here's my notes for abc-music in Karri's MegaPak template for the newer compiler. New(er) Lynx abc notation for the new newcc65 compiler: Octaves: ' one octave higher , one octave lower thus the range of the notes are: "A,A,A,A, AAAA aaaa a'a'a'a'" tones: CDEFGABcdefgab ^ sharp note _ flat note tone lengths (I'm not 100% sure if I remember this correctly). 1 = double length 2= x4 4= x8 z and x paus I put the music (abc notation) in the music folder. Channels and "play" in abcparser.c However I failed turning on the fourth channel when i made the music for "C-Gull", so that's why there's no drums in that one. The instrument sounds can be altered in abcdriver.c taps backup octave intergrate volume attack hold decay Quote Link to comment Share on other sites More sharing options...
Ninjabba Posted November 30, 2011 Author Share Posted November 30, 2011 Sorry, completely missed this post because of work pressure. I'm using the latest cc65 version from their website. Thanks for the schematics, once I have the sound working properly I'll have to study some notes Quote Link to comment Share on other sites More sharing options...
LordKraken Posted August 1, 2016 Share Posted August 1, 2016 Hej guys, Sorry to bump this pretty old subject. I have abcmusic working in my little game project, but I'm wondering now how to get it to play real songs (instead of random beeps). I found some "midi to abc" music converter, and even song already converted to abc, but it looks slightly different from what abcmusic is capable to read. I'm not a musician, so I'm a bit lost now. @Ninjabba, how did you get your music up and playing for instance? Thanks! Quote Link to comment Share on other sites More sharing options...
LX.NET Posted August 2, 2016 Share Posted August 2, 2016 Funny. I looked at this same thread to get abcmusic and chipper to work. Iirc ninjabba used chipper and the music wad done by DerLuchs. Once I know more about this i will post it here. In the same phase now. Quote Link to comment Share on other sites More sharing options...
LordKraken Posted August 3, 2016 Share Posted August 3, 2016 Thanks. I'm trying abcmusic based on 2004 posts (yeah that's old) on a french dev. forum but it always end to 2 problems: 1) Figuring out the "code" for an instrument 2) Adjusting/tweaking song in "real" abc format to the lynx one. I have read about chipper but I haven't tried it yet, and I think I have read somewhere that it doesn't work with the old newcc65, whioch I still use... Quote Link to comment Share on other sites More sharing options...
+karri Posted August 3, 2016 Share Posted August 3, 2016 (edited) The problem with abcmusic is that it is terribly much out of tune. There is three versions of it. An BLL version for asm. A newcc65 version and a cc65 version. I can upload all versions to the atarilynx repository in bitbucket. There is also an archive called abcMIDI which converts from midi to Lynx abcmusic format. One thing I would love to do would be to write an abcmusic front end to chipper. Chipper is not out of tune. PS. I pushed my versions into http://bitbucket.org/atarilynx/lynx/src check contrib/abcmusic Edited August 3, 2016 by karri Quote Link to comment Share on other sites More sharing options...
LordKraken Posted August 3, 2016 Share Posted August 3, 2016 Thanks Karri. I couldn't really hear any tune issue since I'm just playing blip and blop so far. Do you know where I could find this abc2midi tool for lynx? Quote Link to comment Share on other sites More sharing options...
Ninjabba Posted August 4, 2016 Author Share Posted August 4, 2016 Hej guys, Sorry to bump this pretty old subject. I have abcmusic working in my little game project, but I'm wondering now how to get it to play real songs (instead of random beeps). I found some "midi to abc" music converter, and even song already converted to abc, but it looks slightly different from what abcmusic is capable to read. I'm not a musician, so I'm a bit lost now. @Ninjabba, how did you get your music up and playing for instance? Thanks! I've experimented quite a lot with abcmusic and chipper in those days, but chipper is by far superior. Indeed I had DerLuchs creating chiptunes for me, and I converted some chiptunes at some point for smaller projects like Peg Solitaire. I shared the full source which plays a pretty cool tune using chipper, but it will only work with the cc65 toolchain: http://atariage.com/forums/topic/193442-peg-solitaire-source/ Quote Link to comment Share on other sites More sharing options...
LordKraken Posted August 4, 2016 Share Posted August 4, 2016 (edited) Thanks Ninjabba. The whole chipper thing is definitely too complex for me and my need right now! I'll try to experiment a bit with abcmusic, if not for music, at least for basic sound effects. -> Karri, can you confirm me that there is no support for sharp/flat notes and ching octave in the newcc65 version? (I can deal with the later by changing the instrument in the note sequence though). Thx! Edited August 4, 2016 by LordKraken Quote Link to comment Share on other sites More sharing options...
+karri Posted August 5, 2016 Share Posted August 5, 2016 There is support for sharps and flats in abcmusic. I even have a pure C version that is easier to understand and modify. I havw the midi to abcmusic sources at home. Right now I am on our summer cottge on an island going to sauna and a swim in the lake. Back to electricity & civilisation on Monday. Quote Link to comment Share on other sites More sharing options...
LordKraken Posted August 5, 2016 Share Posted August 5, 2016 Hmm ok, maybe that's the restitution of the music in Handy that gave me the impression that it was not working well Quote Link to comment Share on other sites More sharing options...
LordKraken Posted August 6, 2016 Share Posted August 6, 2016 There is indeed support for sharp/flat: ; Find out the pitch of the note ... cmp #$3d ;'=' ... cmp #$7e ;'~' But I have the feeling that Handy doesn't handle them properly. Quote Link to comment Share on other sites More sharing options...
Ninjabba Posted August 6, 2016 Author Share Posted August 6, 2016 You should use mednafen for emulation when it comes to creating soundfx/music. There's a bug in Handy that screws up the sound. Quote Link to comment Share on other sites More sharing options...
Turbo Laser Lynx Posted August 6, 2016 Share Posted August 6, 2016 (edited) I've thought about this many times but never wrote it here: quite many official Lynx titles have music that sound slightly out of tune too, almost to the point that it could be thought of as a trademark thing of the Lynx haha. @Karri, In that sense I think you're a bit harsh on your own creation (abc music), at least I always liked it ^^ it's a nifty little tool if you're just gonna do some small songs'n'stuff. @LordKraken There is a tool (a Lynx program) made by Karri where you can check for abc sounds, but I'm not sure if it's freeware, I don't remember if it was a part of the MegaPak game cartridge from Songbird. However now when we have chipper I would say that one is much faster and easier to use, at least if you're like me and only want to create some fairly simple songs. You just have to look past all the windows and menus and diagrams and focus on the really simple stuff: 1. Eye through some tracker basics: http://wiki.openmpt.org/Manual:_Basics 2. In every row of every column there's three cells where you can put in: - CELL1: the number of the simple instrument you're going to use for that note. (This is really smart 'cause you can get a lot of stuff done with only four channels). - CELL2: the note or nothing (a pause) - CELL3: the part of the song in the playlist 3. The simple instrument is for creating sounds but there's already some good sounds in the insts folder 4. There's some really great songs in the demosongs folder to look at too. *Note you put in the notes with the keyboard (I was clicking aroung with the mouse for much longer than I care to admit) I checked and you can download chipper v.1.7.6 from sages homepage (link in his profile) I attached a pdf manual I found on the interwebz (sorry I can't remember where) where some instrument tweaking is explained. LynxChipper-0.1-ENG.pdf Edited August 6, 2016 by Turbo Laser Lynx 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.
Note: Your post will require moderator approval before it will be visible.