Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Composing > Job for music player coder
2013-06-03 21:07
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Job for music player coder

this is an internal mail on the hvsc line, that i have to share with the scene, because i seek help with a legendary music editor:
------------

Hey,

This is mostly for active coder, ian coog, but maybe inge is reading ?

I always wanted to make a few tunes in electrosound, just never did..
I still have 10+ tunes from john stormont, that are not released, because the electrosound compiler throws away all the tempo changes/cia stuff, when it compiles a tune.

Michael Schwendt, the creator of sidplay, successfully patched the demotune with 6 parts from electrosound, to have all the tmepo changes in it, so it plays just as inside the editor.
But at that time, 1998 i think, it was very complicatged shit, and he was the only knowledable on this.

From what i remember, i only found inside the compiled music, a byte, that is counted down. say from 4 to 0, which gives a single tempo.

I dont know if there is CIA timing inside the electrsound editor itself, but it uses BPM. Just too bad, the compiler doesnt include this.

so perhaps, to solve this problem, instead to try and construct something advanced, if we resource the compiler, and read the player properly, we can be able to make a proper compiler, that includes all the tempo changes ?

i still dream.. i just wanna that fat sound of some choroid tunes, and the modern music programs dont have same kinda engine, so those VINTAGE sounds are almost impossible to recreate.

what you say ?

can we code a proper tune compiler for Electrosound ?

its pretty easy to make music in, especially if you know the tones or play a piano.


Thoughts and ideas please!
 
... 1 post hidden. Click here to view all posts....
 
2013-06-04 06:35
HCL

Registered: Feb 2003
Posts: 716
Interesting.. I suppose you'll have to start a compo to get anything done ;)
2013-06-04 07:17
Mixer

Registered: Apr 2008
Posts: 422
Are the binaries for both the electrosound and tunes available somewhere?

Not promising anything, just would like to take a peek.(pun intended)
2013-06-04 12:21
chatGPZ

Registered: Dec 2001
Posts: 11113
Quote:
I suppose you'll have to start a compo to get anything done ;)

and maybe choose a target that isnt as "special" as electrosound =P
2013-06-04 18:51
Hein

Registered: Apr 2004
Posts: 933
Sequence 11 of the demotune sounds different in Electrosound compared to Electrosound 64, PW modulation isn't the same.

I suppose to get a proper rip from Electrosound (or rather create a stand alone player for Electrosound project files) one has to shave of bits from Electrosound and try to isolate the internal player, instead of using a compiler that isn't 100%.
2013-06-04 20:00
Mixer

Registered: Apr 2008
Posts: 422
As far as I can tell:

The electrosound menu and file operations are basic programs. Font from $2000->. screen at $0400.

The editor it self and play routine have code between $8000->8exx and $c000-$d000. Music note data is between $4000 and $7xxx. Other tables and stuff from $8exx->$9fff.

There are no CIA timer stuff, I did not find any writes to CIA registers from within the code, so it must use the default basic IRQ cycle as basis, then it just redirects $0314 vector to the play routine when it needs it and in the end jumps to $ea31.

The tempo routine reads the first value of each sequence to temporary register $02ad as the tempo in hex, editor part deciphers that to the screen as decimal.

Tempo of the tune in the editor appears to be achieved by a delay loop based on the $02ad. Loop has keyboardchecks embedded in it seems, apparently to keep editor responsive while playing.

I did not look at the compiler or compiled code yet. Seems that the delay loop stuff needs to be done as in the editor or translated to CIA stuff. Anyway, first number of a sequence seems to be the tempo, however it is to be used.
2013-06-04 20:52
iAN CooG

Registered: May 2002
Posts: 3132
Interesting. $02ff is the byte that determines the tempo, or better, the delay between actual play calls, in the compiled electrosound sids. The byte at $02ad is actually read from data and set at play time, but completely ignored by the play routine.
2013-06-04 21:21
iAN CooG

Registered: May 2002
Posts: 3132
/DEMOS/A-F/Electrosound.sid
is the only electrosound sid that manages $02ad changes and is probably the one SIDwave was talking above, with a play routine hacked by Michael.
Filetype: PSID Offset: 0x7c
Init: $0f90 Play: $0fa6
   TITLE: Electrosound
  AUTHOR: Steve Mellin
RELEASED: 1985 Orpheus
Filename: Electrosound.sid
Loading address: $0F90

init
0F90  20 18 15  JSR $1518
0F93  A9 01     LDA #$01
0F95  8D AB 02  STA $02AB
0F98  8D F9 02  STA $02F9
0F9B  A9 08     LDA #$08  ; actual delay between play calls
0F9D  8D FF 02  STA $02FF
0FA0  A9 00     LDA #$00
0FA2  8D AD 0F  STA $0FAC+1
0FA5  60        RTS

play
0FA6  20 65 1A  JSR $1A65
0FA9  AD AD 02  LDA $02AD ; check if it's changed
0FAC  C9 00     CMP #$00  ; if 02ad hasn't changed, get out
0FAE  F0 1E     BEQ $0FCE

0FB0  8D AD 0F  STA $0FAC+1 ; remeber it
0FB3  A2 00     LDX #$00
0FB5  DD D0 0F  CMP tempotable,X ; $02ad values
0FB8  F0 05     BEQ $0FBF

0FBA  E8        INX
0FBB  E0 08     CPX #$08
0FBD  D0 F6     BNE $0FB5

0FBF  8A        TXA
0FC0  0A        ASL
0FC1  AA        TAX
0FC2  BD E0 0F  LDA CIAsettings,X  ; associated CIA timing
0FC5  8D 05 DC  STA $DC05
0FC8  BD E1 0F  LDA CIAsettings+1,X
0FCB  8D 04 DC  STA $DC04
0FCE  60        RTS

tempotable
0FD0  byte $B3
      byte $C6
      byte $D7
      byte $C1
      byte $CE
      byte $EA
      byte $ED
      byte $E7
      byte $B4

CIAsettings
0FE0  word $4510   ; now only needs to know what calc is needed to get these
      word $37E3
      word $2C1A
      word $3B5B
      word $3257
      word $1EED
      word $1CD9
      word $2102
      word $445E

it needs to check at runtime every value stored in $02ad and build the corresponding arrays. Knowing the calcs that lead to the CIA values, a generic 256 items array could be made. Will check it out later.
2013-06-04 21:30
Mixer

Registered: Apr 2008
Posts: 422
this is the delay code from the editor.

sty ff
.C:8476 A0 00 LDY #$00
.C:8478 A2 00 LDX #$00
.C:847a E8 INX
.C:847b D0 FD BNE $847A
.C:847d 84 66 STY $66
.C:847f 20 10 85 JSR $8510 ; keyboard check
.C:8482 A4 66 LDY $66
.C:8484 88 DEY
.C:8485 CC AD 02 CPY $02AD
.C:8488 D0 EE BNE $8478
ldy ff
rts
.
Counts FF long loops down from FF to Tempo value.

It is called as part of the editor main loop. I don't know how BPM accurate the BPM can become with that sort of thinking :)
2013-06-04 21:53
Mixer

Registered: Apr 2008
Posts: 422
Correct my thinking... CIA table is ($FF - Tempo) times N cycles?

N is the editor mainloop minimum + ( x-loop i.e. 5 cycles times 255) + keyboard check time + few overhead cycles for y loop.
2013-06-04 22:26
Mixer

Registered: Apr 2008
Posts: 422
Not quite correct, at least michaels values do not work in linear fashion with my thinking. Oh well..
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Mike
TheRyk/MYD!
Kakka/Extend, Damone..
iceout/Avatar/HF
K-reator/CMS/F4CG
DKT/Samar
Guests online: 133
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Bromance  (9.6)
10 Memento Mori  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.05 sec.