Jump to content

k-Pack

Members
  • Posts

    321
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Buffalo, New York
  • Interests
    Diamond GOS, MIDI, hobby electronics, keeping the Atari equipment running, bicycling, Atari sound
  • Currently Playing
    MIDI Music System
    Diamond GOS - MAC/65
  • Playing Next
    Korg NTS-1 patch editor

Recent Profile Visitors

17,849 profile views

k-Pack's Achievements

Moonsweeper

Moonsweeper (5/9)

178

Reputation

  1. At least once a year a giant used book sale happens in a town near me. Gone are the days when you could find a table full of computer books to look over. Now even the music section is not large enough to keep me busy while my wife looks over the gazillion books that could end up in her shopping bag(s). This year three books were carried to the car. John Brimhall's Adult Piano Course Complete (going to take more then 20 min. every 3 months), Johnannes Brahms Complete Shorter Works for Solo Piano (already in the box for book re-donations), and Traditions by Maggie Sansone for Hammered Dulcimer. Traditions is a collection of Irish, Scottish, English, American, and French-Canadian Folk music for Hammered Dulcimer. The music includes Tremolo, Valley Roll, Grace note, Slide and Roll embellishments that give the dulcimer its unique sound. Programming them into the MIDI Music System (MMS) may present a a bit of a challenge. Not all these techniques are used in any one song and it should be possible learn the sequence of MMS commands. The Hunt - 2000.mp3 The Hunt The Hunt - looked like a fairly easy Irish Hornpipe to get started. I rarely find triplets in my sheet music but a quick look at the MMS manual to jog my memory got me through the first three notes of the song. Once the Melody was in, a base/harmony was programed into Voice 2. This was programed using one note of the cord triad shown for guitar accompaniment. This proved to be a very dull song and started the task of looking for a song a little more Irish sounding. Then this was found 10 pages beyond The Hunt. Made those changes and then looked for a synth patch that sounded close to a dulcimer. On the Proteus 2000 synth "gtr:The 12String" - Cmpsr,7,51 ended the search. It's all here in in the .MUS files for MMS. THEHUNT5.MUS without the control changes for the Proteus 2000. HUNT2000.MUS has the controls and sets patch. Maybe you can find better dulcimer. The Hunt .atr Files: THEHUNT.MUS - Part A and base - as written. THEHUNT2.MUS - THEHUNT + Part B THEHUNT3.MUS- {PartB and Base) V1PB.V01 - #3 as voice files V2.V02 - THEHUNT4.MUS - voice files and part A - complete as written. THEHUNT5.MUS - changed to dotted rhythm. HUNT2000.MUS - Added settings for Proteus 2000 gtr:The 12String - Cmpsr,7,51 (0-4,32-7,S-51) MIDI Channel 1
  2. Not sure which program was used. I think we might have used three words; "Atari computer" and "Jackolantern". Who it was for was not a concern at that moment.
  3. At our belated Christmas celebration, my son asked me to go give him two unrelated words for an AI generated poem. This was the result of my choice of words. Computer: "Sure, I'll try to write a poem about an Atari computer and a Jackolantern. Here is what I came up with: ``` On a dark and stormy night I found an old Atari in the attic It was dusty and rusty and full of wires But I decided to plug it in and see what happens To my surprise, it still worked And I saw the familiar logo on the screen I grabbed a joystick and a cartridge And started to play my favorite game But then I heard a knock on the door And I went downstairs to check it out There was no one there, only a Jackolantern With a wicked grin and a flickering light I brought it inside and put it on the table And then I heard a voice from behind It was the Atari, and it said to me "Hello, I'm your new best friend" It told me that it was lonely and bored And that it wanted to play with me It said that it had a special gift for me And that I should insert the disk I was curious and scared, but I did what it said And I put the disk in the drive The screen went black, and then I saw A horror that I can't describe The Jackolantern came to life And started to chase me around the house It had sharp teeth and claws and flames And it wanted to eat me alive The Atari laughed and taunted me And said that it was all a game It said that I had to survive until dawn Or else I would be its slave I ran and hid and fought and cried But the Jackolantern was too fast and strong It cornered me in the kitchen And I knew that I was doomed But then I had an idea And I grabbed a knife and a can of spray I stabbed the Jackolantern in the eye And sprayed the Atari with the flame They both screamed and burned and melted And I ran outside to the street I saw the sun rising in the sky And I knew that I was free I threw the Atari and the Jackolantern in the trash And I vowed to never play again I learned my lesson that night And I hope that you did too Don't trust an old Atari Or a Jackolantern at your door They might seem harmless and fun But they are really evil and cruel" I just got a crazy idea that AI and the Atari may not be on the best of terms. Is there a video game scenario hidden somewhere in this poem?
  4. I have worked long and hard on a NTS-1 Patch Editor to make it operate with the Diamond GOS. But I fear that it will never work on my system. Strange things started happening as the last of the routines were being worked on. It's taken me a couple of months to realize that the drive to continue working with Diamond was at an end. Over time there were bugs showing up in this compiled program in an ever-increasing frequency. These were problems with code that had already been debugged. At some point I noted that the Free Space reported at the end of the M65 assembly process was all over the place. The real surprise was when an operational program was downloaded from a previous blog entry and would not compile into a working version. Then I couldn't get a simple show-me-a-Dialog-box program to compile and run. I don't have the drive to figure out the problem. It could be the Diamond and/or MAC65 Cart, or the computer. I've even wondered if the power supply might be part of the problem. And…. There is a real possibility that I wasn't up to the programing challenge. This program did require some parts of my brain that hadn't been simulated for some time. Now, I still want utility programs for the NTS-1 and the MIDI MUSIC SYSTEM. They just won't be running under a GOS. Please leave me a thumbs down if you're devastated by this news.
  5. After the MIDI Keyboard started working, the change channel, Radio buttons and adjusting the control values quickly followed. These were assembled into TEST15.APP and the video was recorded. The NTS-1 arpeggiator was turned on and the controls were adjusted. The control values were sent by moving the mouse pointer into the slide area. While the mouse was over the area, the value was displayed above the slide. While the button was pressed, the value was sent to the NTS-1 and displayed in the radio button area. An "XXX" indicates that the control hasn't been set. The patch evolved throughout the video. Near the end it started to produce a sound resembling an organ (I think). Now the LOAD and SAVE routines have to be written and a couple of minor changes need to be made. I think I'm going to start by writing a Save routine for the Random Patch Generator. Considering the last time I programed using the FILESELECT macro was 1993, I can use some practice. It seemed like yesterday until I looked at the 30 year old program listing.
  6. It's been 2 months since my last entry and I want to reassure those interested that progress is being made. But slowly. The display has been designed, the info dialog can be viewed, the event program has been debugged and the keyboard can be used to play notes. Note: audio was recorded from the NTS-1. Silence - until the keyboard icon is clicked. Already, the ability to change the MIDI channel from the dropdown menu has been tested and debugged. I wish they were all that easy. The Diamond's EVENT was not working the way I wanted. The QUIT option would not exit the program and return to the desktop. I rewrote the code from scratch and still couldn't get the EVENT loop to work. I started to wonder if there wasn't something wrong with the Diamond cartridge but as usual, there wasn't. I had put a semicolon in front of the JSR's in the Event loop to ignore the ones that hadn't been written. And one in front of a JMP that needed to be made. Solution to problem #1. REMOVE the ";". The second event routine to be added to the Event loop was the keyboard icon event. It was needed to send NOTEON and NOTEOFF commands to the NTS-1. After a few changes the keyboard started working but would then start sending erroneous data, then sometimes it would send a couple more notes. The three weeks of studying the code had little effect. Then …. A brain fart. Solution to problem #2. Change the *= from $2100 to $2300. Now all that’s left is to write the active control icon selection process (radio buttons), change the value of the active control, send the CC control command to the NTS-1, load a saved patch, and save a new patch in MIDI Music System voice format.
  7. Once the radio buttons were shown to be a way to pick the MIDI controller to be adjusted, a demo of a method to make the adjustments was attempted. The objective was to use the mouse so that it could be moved to adjust the value and click to set the controller value. I also wanted the option of changing the controller value in real time as the value was changed. As it turned out, it will be a simple matter to implement…. next time. A touch area is drawn on the screen. When the mouse pointer is over this area it can be moved left or right to adjust a value between 0 and 127. When the value is set, a click of the mouse button will cause the MIDI CC value to be set and sent to the NTS-1. Also above the touch area, holding down the mouse button will change the CC value in real time as the mouse is slid left or right. I have been referring to this object as a slide( for lack of a better work). The ATR has the working demo and .Included files. The #Dn: most likely need to be changed before compilation. You can run SLIDE.APP from the Diamond desktop. Move the mouse over the slide. Press and hold the button to change the value as the mouse is moved. Press Q to quit demo. slide input.atr In the source code below that line 150 - 180 draws the slide area. Having it look like a musical staff was quite unintentional. The code to use the slide is within the event loop but not part of DIAMOND's EVENT call. Line 220 -460. Lines 220 - 350 checks to see if the mouse is within the slide area. If not the program jumps to perform the EVENT call at line 470 - EL1. Line 360 -370 sets the SCREENX value to an output value of 0-127. Line 390-400 displays the value of the slide Line 410 gets CLICK , 420 if 0 then go back and check if still in slide area. Line 430 show slide value in value(this is were the MIDI CC command will be sent) Line 440 force the CLICK VALUE to 1, it could be 2,3 if double clicked. Line 450 keep checking until mouse is outside slide. 10 ;SLIDER INPUT DEMO 20 ; MOUSE INPUT BY CREATING TOUCH AREA. 30 ;K. PACKARD 3/23/2023 40 *= $2000 50 .OPT NO LIST 60 .INCLUDE #D1:DMACRO01.M65 70 .INCLUDE #D2:SHOWINFO.JSR 80 .INCLUDE #D1:BYTE2DEC.JSR 90 QICON .BYTE 0,60,102,102,102,108,54,0 0100 VAL .BYTE 0 0110 ; 0120 START 0130 INIT 0 0140 INSTALLICON 0,10,10,1,8,QICON 0150 PLOTBOX 32,130,159,150,2,1 0160 PLOTLINE 32,135,159,135,2,1 0170 PLOTLINE 32,140,159,140,2,1 0180 PLOTLINE 32,145,159,145,2,1 0190 JSR SHOWINFO_JSR 0200 ; 0210 ELOOP 0220 ; CHECK SLIDER ROUTINE 0230 LDA SCREENY ;MOUSE Y POS 0240 CMP #130 ;ABOVE GO EL1 0250 BCS LOC1 0260 LDA SCREENX 0270 JMP EL1 0280 LOC1 0290 CMP #150 ;BELOW GO EL1 0300 BCC LOC2 0310 JMP EL1 0320 LOC2 0330 LDA SCREENX ;MOUSE X POS 0340 CMP #32 ;RIGHT GO EL1 0350 BMI EL1 0360 CLC ;MOUSE OVER SLIDE 0370 SBC #31 ;LOCATION TO VALUE 0380 STA VAL 0390 JSR BYTE2DEC ; SHOW SLIDE VAL 0400 SYSDRAW B2DSTRING,30,120,0 0410 LDA CLICK 0420 BEQ ELOOP ;MOUSE BUTTON UP 0430 SYSDRAW B2DSTRING,30,40,0 0440 LDX #1 0450 STX CLICK 0460 JMP ELOOP 0470 EL1 EVENT ;DIAMOND EVENT LOOP 0480 LDA EVENTTYPE 0490 BEQ ELOOP ;NOEVENT 0500 CMP #1 ;ICON EVENT 0510 BNE ELOOP 0520 EXIT 0530 EXECDESKTOP 0540 ; 0550 *= $02E0 0560 .WORD START
  8. I seem to remember that setting up radio buttons using Visual BASIC 4 was a point, click and fill in the properties table procedure. Not so easy with Diamond GOS. Programming Diamond is a lot like the early days of the Atari programing, when the only way to know if an algorithm would work was to try it, rather than searching the internet for an error free method. Add up the frustration from (what I don't know about the (Atari hardware + MAC-65 + assembly language + Diamond GOS)) and you get the mountain I have to climb because it's there. But it feels so good when you reach the top. The NTS-1 Patch Editor is going to need a radio button cluster using 26 icons; one for each of the MIDI controls. Clicking on a button icon should change the image of the button to on, change the last button to the off image and store the icon number to memory. That's the easy part after the icon graphic has been designed. The process can be done using 2 Diamond functions. INSTALLICON(#4) and SHAPEICON(#7). The when-to-do-it is determined in the EVENT loop. If an icon event is detected the memory location EVENTTYPE should contain 1($01). EVENTTYPE+1 will be equal to the Icon number. This can all be done using the MAC-65 macros provided in the DMACRO.M65 library (my DMACRO01.M65 is the Diamond macro library with a couple of changes/corrections) But….. The macros were written using the immediate addressing mode and requires values be passed to the macro in the argument list. Rewriting the macos as a subroutine using absolute,X addressing, and data tables is far more memory efficient. This short 3 radio button-do-nothing demo was used to test a routine that would change the on/off icon graphic and set the ACTIVEICON number. It should be scalable to 26 icons. Failure is not an option. The program RADIO.APP can be run from the desktop. Click on the buttons to change the active icon or the Q icon to return to the desktop. The other files are source code in .M65. The SYSPRT.MAS is a Macro And Subroutine that replaces the Diamond's SYSDRAW macro. Radio 3 button demo.atr I'm not sold on the use of multiple ON graphics for each icon. Seems that if you change the icon shape and then change it back, the ON graphic could be used again for the next icon. I tried this three times without success, but it always worked when using an ON and OFF graphic for each icon. Right now, it's just one more place where memory might be found if it gets scarce. The MAC-65 source code: 10 ;RADIO BUTTON DEMO - DEMONSTRATES 20 ;USING ICONS TO CREATE A SERIES OF 30 ; BUTTONS WHERE ONLY ONE BUTTON CAN 40 ; BE ON/ACTIVE/PUSHED-IN. 50 ; 60 ;KEVIN PACKARD 3/2023 70 ; 80 ; 90 ; 0100 .OPT NO LIST 0110 *= $2000 0120 .INCLUDE #D1:DMACRO01.M65 0130 .INCLUDE #D1:SYSPRT.MAS 0140 ; 0150 BUTOF1 .BYTE 0,60,102,66,66,102,60,0 0160 BUTON1 .BYTE 0,60,126,126,126,126,60,0 0170 BUTOF2 .BYTE 0,60,102,66,66,102,60,0 0180 BUTON2 .BYTE 0,60,126,126,126,126,60,0 0190 BUTOF3 .BYTE 0,60,102,66,66,102,60,0 0200 BUTON3 .BYTE 0,60,126,126,126,126,60,0 0220 BUTOFADRLO .BYTE 0, <BUTOF1, <BUTOF2, <BUTOF3 0230 BUTOFADRHI .BYTE 0, >BUTOF1, >BUTOF2, >BUTOF3 0240 BUTONADRLO .BYTE 0, <BUTON1, <BUTON2, <BUTON3 0250 BUTONADRHI .BYTE 0, >BUTON1, >BUTON2, >BUTON3 0260 ACTIVEICON .BYTE 1 0270 QICON .BYTE 0,60,102,102,102,108,54,0 0280 ;SYSPRT FORMAT X,Y,FONT,"TXT",255 0290 ASTR .BYTE 10,10,0,"A A",255 0300 BSTR .BYTE 10,20,0,"B B",255 0310 CSTR .BYTE 10,30,0,"C C",255 0320 ; 0330 START 0340 INIT 0 0350 SYSPRT ASTR 0360 SYSPRT BSTR 0370 SYSPRT CSTR 0380 INSTALLICON 0,10,70,1,8,QICON 0390 INSTALLICON 1,10,10,1,8,BUTOF1 0400 INSTALLICON 2,10,20,1,8,BUTOF2 0410 INSTALLICON 3,10,30,1,8,BUTOF3 0420 LDX ACTIVEICON ;TURN ON INIT BUTTON 0430 STX B0 0440 JSR INITON 0450 ; 0460 LOOP EVENT 0470 LDA EVENTTYPE 0480 BEQ LOOP ;NO EVENT 0490 CMP #1 0500 BNE LOOP ;EVENT NOT ICON 0510 LDA EVENTTYPE+1 0520 BEQ ENDIT ;IF ICON 0 END 0530 CMP #4 0540 BCS LOOP ;IF < NOT IN RANGE 0550 JSR CHANGEICON ;CHANGE BUTON 0560 JMP LOOP 0570 ENDIT EXIT 0580 EXECDESKTOP 0600 ; 0610 CHANGEICON 0620 LDA ACTIVEICON ;ICON TO CHANGE 0630 STA B0 0640 TAX ;ACTIVEICON OFFSET 0650 LDA BUTOFADRLO,X 0660 STA W0 0670 LDA BUTOFADRHI,X 0680 STA W0+1 0690 LDA #7 ;SHAPEICON 0700 JSR DIAMOND 0710 LDA EVENTTYPE+1 ;GET ICON # 0720 STA ACTIVEICON ;MAKE ACTIVE 0730 STA B0 ;OFF SET TO ADDRESS TABLE 0740 TAX 0750 INITON LDA BUTONADRLO,X 0760 STA W0 0770 LDA BUTONADRHI,X 0780 STA W0+1 0790 LDA #7 0800 JSR DIAMOND 0810 RTS 0820 ; 0830 *= $02E0 0840 .WORD START There is still the LOAD/SAVE and the change value routines to write before I start climbing Mt. Editor. Yup, just 3 more miles to base camp. Raido three button demo.txt
  9. After playing with RND(NTS-1), it became apparent that the patch editor is going to need some way of sending MIDI NOTEON and NOTEOFF commands from the computer. I tried to use characters to draw a horizontal keyboard, 2 keys per character. I was not happy with the visual results. Eventually the characters were rotated and used to create a keyboard Icon where the keys were orientated vertically. The improvement was due more to its orientation then it was due to it being displayed as an icon. It wasn't until I started programing the EVENTs that I realized how much easier my life got when the icon was used. When the EVENT procedure is called, 5 memory locations are filled with the icon event data. ICON event data $9A93 EVENTTYPE icon event = 1 $9A94 EVENTTYPE+1 icon#(0-31) $9A95 EVENTTYPE+2 # clicks $9A96 EVENTTYPE+3 X position $9A97 EVENTTYPE+4 Y position The EVENTTYPE locations are only changed when the EVENT procedure is called. These three locations are updated with some regularity and quite often: $9A80 SCREENX $9A81 SCREENY $9A82 CLICK 0=button up, 1=button down, 2 = 2 single click, 3 = double click KEY6.APP is the test program for the keyboard icon. There is nothing musical about it. The program just puts the icon on the screen and then displays the memory locations as they change. Clicking the "Q" in the lower right corner will return you to the DESKTOP. (Sorry no source code. I turned it into icon data with the press of a button.) This program demonstrates that when the mouse button was held down while the mouse is pointing to an icon, EVENTTYPE+2 and CLICK would both register 1. Then when released, CLICK became zero but EVENTTYPE+2 remained as one until the next EVENT call (Good to know #1) As expected, the SCREENX and SCREENY were not equal to EVENTTYPE+3 and EVENTTYPE+4. The EVENTTYPE X and Y is in reference to the origin coordinates of the icon (Good to know #2). Diamond does half the work of determining which key is being pressed within the icon. The Y position can then be scaled over the range of the keyboard. (NOTE#= -Y/4 + 81) MIDIKEY1.APP is the program to be used with a MIDIMAX compatable interface and MIDI sound synthisizer set to receive data on Channel 1. Click the infodialog box to access the almost 4 octave keyboard. Move the mouse onto the key you wish to play. Middle C (60) is indicated by a dot on the ivory. Hold down the mouse button to begin playing the note and then release for NOTEOFF. Double click to latch the NOTEON and then single click anywhere on the keyboard icon for NOTEOFF. "Q" is still in the same location. Don't expect to be playing Bach with this keyboard. Its going to work for turning notes on and off to test settings in the patch editor. I've included the MAC/65 source code 'cause there is always room for improvement. MidiKey1.atr
  10. Thanks... Just finished skimming chapter 5 in the MIDI Track manual. I will be reading it a couple more times before it sinks in. So, what I am hearing is that the MIDIMax gets a pulse from the Atari and then sends the byte $F8 to the MIDI out. Please don't spend a lot of time implementing the sync triggers just for me, at least until my MIDIMAX explodes.
  11. when you start looking for information, Atari DeRe has some examples. Just be aware that I had to make some modifications to the software to get them to work. That's almost 5 years ago, so I don't remember much.
  12. I was thinking the SIO Proceed line has more to do with the timing of the data being passed from the Atari to the MIDI Mate. The MIDI Timing Clock is the byte "$F8". The MIDI MUSIC SYSTEM sends a $F8 to the MIDI Mate and the MIDI Mate passes the $F8 to the MIDI out port 24 times per quarter note. The frequency is controlled by changing the TEMPO in the MMS software. I have seen the $F8 being sent while monitoring the MIDI output line and they scroll by very fast. The MMS automatically sets the joystick pin and sends the MIDI Clock at 24 pulses/quarter note at the same time. The Pocket Operators are not MIDI compatible but will accept digital pulses for synchronization. While the Korg microKorg and Korg NTS-1 can be synchronized with the MIDI Clock.
  13. I just remembered that using the SIO port limits the ability to make music from pokey. Another option, besides the joystick port, would be to use the Cassette Motor control pin on the SIO port to output the timing signal to the Arduino.
  14. It would be something to hear a Pocket Operator sync'ed to some of your music. It would also be great if you could control the pulses in the Atari then you wouldn't need the Arduino. My problem was that I had to take the pulse form the MIDI Music Software in whatever form they were in (24 pulses/quater note). This blog entry used a MIDI timing Clock to sync the NTS-1 arpeggiator with the Atari. I've been thinking about sending the MIDI timing clock command to an Arduino with a MIDI shield and then pulse the PO with a digital pin. Some day.
  15. see link above, posted September 6th, for video and audio example.
×
×
  • Create New...