Jump to content
IGNORED

Making music for Lynx


jp48

Recommended Posts

Hi all,

 

Okay, just bought Atari Lynx from eBay (35 GBP), I have been checking, reading and studying Lynx music tools: chipper, SASS, HandyMusic, mostly. I know there's abc music by Karri, but can't find it at the moment (lots of dead links everywhere).

 

So far it seems (for me) that SASS macro format of creating instruments + music tracks fits best as I write own software and am able to generate (mostly algorithmic) tracks files for SASS. There are some things for I would need a little help.

 

1. A simple player routine for SASS/HMCC .mus files ? Perhaps stripped HandyAudition (or expanded for live gigs) ? What I need (at first) is just blank screen playing the track(s), any tips and/or advices, please share.

 

2. Most simple (and affordable) way to run homebrew track(s) in real Lynx ?

 

3. Apparently BLL kit is needed for HandyMusic ? I am running 1.40c version of HandyMusic, what's the correct version of Bastian Schick’s BLL kit ? Or is it same as LynxBuild in HandyAudition BUILD dir ?

 

I will use chipper for other kind of music projects, just now I really would like to make some music with Lynx, and if all goes well, use Lynx as live instrument (possible with Atari 2600 + synthcart) at the end of this year.

 

 

Thanks for advance ! :)

 

 

-Jukka

Link to comment
Share on other sites

Hello,

 

The abcmusic suffered from being out of tune. It is not at all up to chipper or HandyMusic quality. That is the reason I abandoned it more or less.

 

I may end up making an abcmusic frontend to chipper some day.

 

The easiest way today to run music on the Lynx would be to either use BLL headers producing *.o files that can be uploaded to the Lynx using ComLynx.

 

The second way that comes to mind would be to write a small program that accepts music through ComLynx and plays it. For that you need an EPROM cart and a burner.

Link to comment
Share on other sites

Thanks ! Karri, good to know abcmusic status, ComLynx was in my mind, that seems easiest way. LX.NET, thanks of info, I will check the uploading sound files, I should have latest version of HandyMusic.

 

Although I am not a good programmer, I am planning (and going to start today) writing a small sequencer with CC65. I need a Lynx software for live gigs, so I start making simple sequencer, it runs constantly in 4x4 grid or 16 item row, with buttons moving each slot and possibility to change audio REG's on the fly (I have Karri's pong as example of writing sound registers).

Very limited at first, let's see.

Link to comment
Share on other sites

I will upload me ABC music code to bitbucket later today. It may give some simple insight in how the instruments and the registers work. There is two versions. One for BLL and one for cc65.

 

The fastest way for me to create a sequencer for a Lynx would be to start from Chipper. I used it in "Shaken, not stirred". You just need one file https://bitbucket.org/karri/shaken/src and from there resident and lynx-snd.s

 

In the sounds directory you have soundbs.mac and track.s that when combined produce the bytestream needed by chipper.

 

With a little magic and clever programming you might be able to store usable patterns in Lynx RAM in advance and control the "orchestra or beeps" via ComLynx. The highest speed you get is 62500 bits per second which is more than MIDI 31250 bits per second. Unfortunately the Lynx wants 8 bit+parity+stop bit while MIDI lacks the parity bit. But the Lynx supports 31250 bits per second speeds so with an Arduino in the MIDI cable you might connect the Lynx to your MIDI keyboard ;)

Edited by karri
Link to comment
Share on other sites

Excellent, thanks Karri !

 

Checking your bitbucket repository, looks good, I will create account there too and fork your project.

 

Just now I am playing with first Lynx program I wrote, simply making sounds changing taps and pitch values controlled by joy_btn. Handy is rather glitchy with some sounds, unfortunately, would like to record something just for testing more.

 

I have programmed TIA and POKEY, and usually used simply vblank for speed/tempo controlling. Can't find vblank for Lynx (from CC65 include files), some combination of MIKEY timers, perhaps ?

 

Oh well, yes, MIDI would be absolutely great, not with keyboard but with my Korg and Roland grooveboxes, that's the ultimate goal of mine :). I do have Arduino Uno3, just got it, 6 euros from DealExtreme :) !

Link to comment
Share on other sites

Hey,

 

I believe that HandyMusic has the ability to upload sound files for playing in its latest version of the demo player

This is correct, HandyAudition lets you download HMCC's .mus files to the comlynx port @ 9600bps, 8N2. So you can do the compile-send-listen-compile-send-listen loop with a proper hardware target.

 

The BLL kit is not actually needed at all unless you want to recompile HandyAudition.

Link to comment
Share on other sites

Hey TailChao, thanks of info, good to know. Just got the message that my Lynx is shipped so it should be here in a week or so. Lots of things to study still, even to get my 1-channel sequencer prototype to run (need that vblank/timer info). After getting the real machine, I am going to test comlynx etc, I assume I need to build the cable too.

 

Thanks !

Link to comment
Share on other sites

 

Regarding the Comlynx cable, what is the go-to method of doing this? Is LX.NET's tutorial the way to go?

( https://atarilynxdeveloper.wordpress.com/2013/10/21/creating-a-comlynx-to-usb-cable/ )

 

I am using FTDI chips for the ComLynx cable. They support the full speed 62500 and 31250 on both Windows and Linux.

 

There is also a small program called Mttty.exe that I wrote for Windows 3.1 many many years ago. To my big surprise it still works on modern Win machines out of the box. Perhaps the reason is was that it was written without any toolkits.

 

If I still find the sources I will upload them to bitbucket.

 

It has built-in support for weird baudrates and USB-serial converters.

 

The program also runs fine on Linux using Wine.

Link to comment
Share on other sites

On a related topic.

 

The cc65 is using a technique called "interruptor". The linker searches routines marked with .interruptor and builds a table of addresses. On every hardware interrupt all routines marked with .interruptor will be called. The cc65 is always using interrupts for the screen and ComLynx so the IRQ system is already initialized at startup.

 

In Shaken/resident/playtime.s you can see how an interruptor is used with a vblank timer.

 

The Shaken/resident/lynx-snd.s (chipper) also contains an interruptor but it uses timers of its own and does not rely on the vblank timer.

 

Both receive byte and transmit buffer empty generates interrupts. There is also a ring buffer that should make ComLynx more convenient to program for. LX.NET has some excellent tutorials about programming for the Lynx. Check them out.

Edited by karri
Link to comment
Share on other sites

Interruptor code in cc65 has to be written in assembler. I guess you could pull some trick to call into a C routine, but not sure whether you want to do that for time-critical routines.

There is a tutorial part on the timers: https://atarilynxdeveloper.wordpress.com/2013/10/24/programming-tutorial-part-14timers/

 

BTW, the FTDI chips have worked very well for me. No errors and a very clean connector. I order these: http://www.ebay.com/itm/370668345808?_trksid=p2055119.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT as it has this case for the USB PCB part. Looks professional.

  • Like 1
Link to comment
Share on other sites

Yes, I have checked tutorial part, not sure if I understood them correctly (as I can't get working).

 

CC65 NES library contains simple waitvblank(), that's something I try to make. At first phase this little sequencer is really not critical in any possible way :D

 

Thanks !

Link to comment
Share on other sites

OK, I am trying now with this example:


#define ENABLE_INTERRUPT 0x80

    MIKEY.timer5.control = ENABLE_INTERRUPT | 0x1E;

.......
  
    MIKEY.timer5.reload = 255;
    MIKEY.timer5.count = 255;

Running last two lines in loop between each step of sequencer. I tried other timers too, like timer2, but can't find 1/60 sec duration of any of them. But seems to work, at least sequencer is running and I am able to "adjust" values real time.

 

A little sound example here:

 

seq-ex1.mp3

 

Handy is making short pauses/glitching, I hope, not the program itself.

Link to comment
Share on other sites

Hi obschan, hmcc/handymusic is very interesting project, yes, I would like to participate, as I have noted I am not good programmer, but with any other things (and in limits of my programming skills), yes, very much !

Link to comment
Share on other sites

  • 1 year later...

Sorry for digging up an old thread. Has anybody already created a live player interface between a keyboard and the Lynx? jp48?

 

The Lynx supports 31250 bauds also used for Midi but it does not support "no parity". So creating a simple cable would not work.

 

One way to solve this would be to use:

- Midi to USB cable connected to PiZero USB port

- PiZero for turning Midi key presses to register values for the Lynx. Some Python code perhaps. There is lots of Midi libraries available.

- PiZero UART for sending register values to the Lynx using the ComLynx port. Requires a little electronics.

- A simple music player reading register value pairs (address, value) from the ComLynx and writing them to the hardware.

 

My keyboard already has a record function so this would be one way to compose music for the Lynx.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...