Jump to content

TheBF

+AtariAge Subscriber
  • Posts

    4,464
  • Joined

  • Last visited

1 Follower

About TheBF

Profile Information

  • Gender
    Male
  • Location
    The Great White North
  • Interests
    Music/music production, The Forth programming language and implementations.
  • Currently Playing
    Guitar
  • Playing Next
    Trumpet ;)

Recent Profile Visitors

8,175 profile views

TheBF's Achievements

River Patroller

River Patroller (8/9)

6.1k

Reputation

  1. Very naughty photo. Your nerds are showing.
  2. Nice to see you back Mark. I suspect life has gotten in the way of the serious job of playing with Forth on a 40 year old machine.
  3. If you can convince a local TV station to do the story that gets people's attention. Better if it's a national network station where the story can get distributed across the country.
  4. Excellent. Why? For that time that you need it and it won't work as expected. However if that is unthinkable then you are correct. Don't write code for stuff that "might" happen.
  5. Curiosity question. Is there a way to access the screen management variables in the P-code system? Where I am going is; is there any point is seeing what mode the system thinks it is in? (Text, graphics 1, as the two most common ones) That way your gchar function could maybe know the line length so that 32 would be replaced by a variable that "knows" the current line length. Asking for a friend
  6. That's pretty amazing for an Extended BASIC program.
  7. Cool. My dad's family comes from a part of Canada with an Irish and French fiddle tradition. I played fiddle badly when I was young. I played guitar as a part-time professional for many years. I just took up Viola last June and joined a community orchestra. Good for old fingers and brains to get some exercise. But it does cut into my coding time. I am working on some Irish and Scots tunes on Viola. It's a bit harder but some of the tunes sound nice in the lower key.
  8. Sounds like the future is coming at us quickly.
  9. So does that mean that the CIA can't know what you are talking about... but Meta can?
  10. Well this is fun. We can extend the range down more than an octave using the bass trick with the noise generator driven by channel 3. \ ==================[ BASS VOICE ]================== \ Bass voice uses the TENOR oscillator and the noise channel \ It also has a lower volume so you have to reduce volume of \ the other channels if used in combination : PLAY.BASS ( fcode -- ) OSC3 OR SPLIT SND! SND! \ send frequency data on channel 3 31 ATT3 OR SND! \ but chan 3 is silent -5 OSC4 OR SND! \ select noise channel for output VOLUME @ ATT4 OR SND! \ send volume \ BASS Note is now playing... ON_TIME @ DELAY \ set the ISR timer, which auto mutes OFF_TIME @ DELAY \ time between notes ; DECIMAL : BASS: ( freq -- ) CREATE 15 * HZ>CODE , \ calibrate freq. & pre-calculate the code DOES> @ PLAY.BASS ; \ FREQ NATURAL FREQ ACCIDENTAL EN-HARMONIC 41 BASS: E1 \ Lowest note of Bass guitar 44 BASS: F1 46 BASS: F#1 : Gb0 F#1 ; 49 BASS: G1 52 BASS: G#1 : Ab G#1 ; 55 BASS: A1 58 BASS: A#1 : Bb A#1 ; 62 BASS: B1 65 BASS: C2 69 BASS: C#2 : Db1 C#2 ; 73 BASS: D2 78 BASS: D#2 : Eb1 D#2 ; 82 BASS: E2 \ Lowest Note of Guitar 87 BASS: F2 93 BASS: F#2 : Gb1 F#2 ; 98 BASS: G2 104 BASS: G#2 : Ab1 G#2 ;
  11. In the mean time... I finally got something working that I knew was possible but I just didn't get all the pieces right before now. Maybe I am still learning... Long ago I made a "language" to write music as text where notes are Forth words that know how to play themselves. I added an "expression" feature where you could set how the music was played as in legato (notes connected) staccatto (notes are separated) etc. It has dynamics to control the volume. You can set the time signature. (I don't have a key signature feature and that might just make it more complicated) And you can use ||: <music notes> :|| to cause a section to repeat which is like real music notation. The fractions select the note type. quarter-note, half-note, eighth-note etc. Here is Twinkle Twinkle Little Star in the key of A major. : TWINKLE 120 BPM SOPRANO 4/4 NORMAL forte | 1/4 A4 A4 E5 E5 | F#5 F#5 1/2 E5 | | 1/4 D5 D5 C#5 C#5 | B4 B4 1/2 A4 | mf | 1/4 E5 E5 D5 D5 | C#5 C#5 1/2 B4 | | 1/4 E5 E5 D5 D5 | C#5 C#5 1/2 B4 | ff | 1/4 A4 A4 E5 E5 | F#5 F#5 1/2 E5 | | 1/4 D5 D5 C#5 C#5 | B4 B4 1/2. A4 || ; Anyway that was the easy part. The hard part was that I could never write three parts (melody, harmony, bass for example) and have them all play via the multi-tasker. They would always run out of sync. But this week I finally got it. The secret was something I had tried before but over-complicated it a bit. The idea is to let an interrupt service routine do the timing of the notes and automagically "mute" the sound channel when its timer has expired. The 2nd helpful thing was to send all the sound bytes for each voice un-interrupted for each voice, meaning don't put a PAUSE in between which changes tasks. Then a DELAY function that waits in a loop calling PAUSE to give the other voices time. This helped keep everything synchronized. Here is the code for the four muting isr timers Here is a descant and bassline for Twinkle And here is what happens when you run the Forth words in three separate tasks. Twinkle Music script.mp4 Here is the music script player code
  12. I did a similar study a while back and saw no advantage to changing to absolute addresses and in fact if you wanted to relocate binary images of Forth code it's one less thing to worry about when you use relative branching.
  13. I love Tom Lehrer. This is one my "cold war" favourites. Might be time to resurrect it...
×
×
  • Create New...