What the PSG also can sound like...

صفحة 4/7
1 | 2 | 3 | | 5 | 6 | 7

بواسطة NYYRIKKI

Enlighted (6091)

صورة NYYRIKKI

22-06-2017, 15:36

mmm... Ok, so on MSX what you get is that you have to accurately set the volume only on one edge instead of two... but that does not sound very useful as you still need to accurately count the whole time... I mean as you still need to calculate the whole time there is no much difference to playing these kind of sounds without PSG (ie. with key click) by changing the pulse on both edges accurately. -> Technically nice trick, but seems useless (on our platform)

3rd time... So the "save" is that instead of "accurate change, accurate change, accurate change" you can do "accurate change, almost accurate change, accurate change" instead. Right?

بواسطة Grauw

Ascended (10820)

صورة Grauw

22-06-2017, 15:55

I posted some example code on the previous page just before your reply Big smile.

As for usefulness, with fully manual CPU timing on an ISR the tone frequency will be hard to get stable; with the PSG at least the base frequency will be solid, the pulse width (duty cycle) may jitter or drift a little but this is probably acceptable.

بواسطة JohnHassink

Ambassador (5684)

صورة JohnHassink

22-06-2017, 16:27

بواسطة Grauw

Ascended (10820)

صورة Grauw

22-06-2017, 16:34

That’s for SCC, surely...

بواسطة syn

Prophet (2134)

صورة syn

22-06-2017, 17:20

yep.

Still have it on my todo list to make some song with TT(scc) to use all those nifty tricks not available in the FM version Smile

بواسطة JohnHassink

Ambassador (5684)

صورة JohnHassink

22-06-2017, 19:34

Oh yeah, derp.

بواسطة hit9918

Prophet (2932)

صورة hit9918

23-06-2017, 00:09

I wanted to tell a secret. the SCC is a SID. it has
pulse width
triangle
sawtooth
square
article: how to enable the filter on SCC the digital synthesizer Big smile pick a waveform. add a sine. divide by 2. done.

بواسطة syn

Prophet (2134)

صورة syn

23-06-2017, 02:05

Interesting point of view. It does sound different I think, although I don't think anyone has used the scc this way?

Also that filter trick works well and not difficult to implement? Maybe suggest it to Huey for trilotracker Tongue

بواسطة hit9918

Prophet (2932)

صورة hit9918

23-06-2017, 02:48

I remember ideas of a waveform morphing feature, I dont know whether it is finished. that maybe could move to the middle of a waveform and a sine.

another way is say load channel 4 channel 5 with sinus.
and the thing you want to filter, set halve volume, copy the whole column over to channel 4, channel 4 plays all the same, except with sinus.

but, I told the filter story just to give an idea of possibilities.
the first nice thing is to try out pulse width. and then vibrato wiggle its percentage.
and then you practically got the whole SID topic.

بواسطة hit9918

Prophet (2932)

صورة hit9918

23-06-2017, 03:15

this BASIC makes the SCC sound like in church. maybe the chip could do arcade r-type, who knows.
using a BASIC program to add sinuses. or calculate other ideas.

in openmsx with toggle_scc_viever you can see the curves
SCC needed in slot 1. In machine code after the "3E", that gotta be slot ID.
it takes a while to make the sinuses, then press enter for sound.

autoexec.bas

10 poke &hf677,&hc2 : poke &hf676,&h01 : poke &hc200,0
20 run"loader.bas"

loader.bas

10 screen 0 : width 40 : key off : ?:?:?:?"SCC TEST CENTER :)"
20 b3 = &h9000 'bank3

31 w1 = &h9800
32 w2 = &h9820
33 w3 = &h9840
34 w4 = &h9860

41 f1 = &h9880
42 f2 = &h9882
43 f3 = &h9884
44 f4 = &h9886
45 f5 = &h9888

51 v1 = &h988a
52 v2 = &h988b
53 v3 = &h988c
54 v4 = &h988d
55 v5 = &h988e

60 o  = &h988f 'on/off bits
70 d  = &h98E0 'deformation register

100 restore 9200 : read a : defusr = a : gosub 9000 : x=usr(0) 'scc subslot
101 'restore 9300 : read a : defusr1 = a : gosub 9000 'write wave, addr in defusr

120 poke b3,&h3f
140 poke o,&b11111  'all channels on
150 poke v4,0

1000 for i = 0 to 31
1010 n = 60

1020 a =     cos(i/32*2*3.1415926 *1)/1  * n
1021 a = a + cos(i/32*2*3.1415926 *2)/2  * n
1022'a = a + cos(i/32*2*3.1415926 *3)/3  * n
1023 a = a + cos(i/32*2*3.1415926 *4)/4  * n
1024'a = a + cos(i/32*2*3.1415926 *5)/5  * n
1025'a = a + cos(i/32*2*3.1415926 *6)/6  * n
1026'a = a + cos(i/32*2*3.1415926 *7)/7  * n
1027 a = a + cos(i/32*2*3.1415926 *8)/8  * n
1028'a = a + cos(i/32*2*3.1415926 *9)/9  * n
1029 a = a + cos(i/32*2*3.1415926*16)/16 * n

1030'a = a + cos(i/32*2*3.1415926 *1*3)/1  * n
1031'a = a + cos(i/32*2*3.1415926 *2*3)/2  * n
1032'a = a + cos(i/32*2*3.1415926 *3*3)/3  * n
1033'a = a + cos(i/32*2*3.1415926 *4*3)/4  * n
1034'a = a + cos(i/32*2*3.1415926 *5*3)/5  * n
1035'a = a + cos(i/32*2*3.1415926 *6*3)/6  * n
1036'a = a + cos(i/32*2*3.1415926 *7*3)/7  * n
1037'a = a + cos(i/32*2*3.1415926 *8*3)/8  * n
1038'a = a + cos(i/32*2*3.1415926 *9*3)/9  * n
1039'a = a + cos(i/32*2*3.1415926*16*3)/16 * n

1040 if a > 127 then a = 127
1050 if a < -128 then a = -128
1060 poke w4+i,a and 255
1100 next

2000 poke f4,0 : poke f4+1,2



2100 input a

2110 for i = 0 to 15 step 1 : poke v4,i : next
2112 for i = 15 to 14 step -0.05 : poke v4,i : next
2114 for i = 14 to 8 step 1 : poke v4,i : next
2120 for i = 7 to 0 step -0.08 : poke v4,i : next

2210 ''for i = 0 to 15 step 1 : poke v4,i : next
2212 'for i = 15 to 14 step -0.2 : poke v4,i : next
2214 'for i = 14 to 6 step 1 : poke v4,i : next
2220 'for i = 6 to 0 step -0.05 : poke v4,i : next

2300 goto 2100


8900 poke v1,0 : poke v2,0 : poke v3,0 : poke v4,0 : poke v5,0 : poke d,0
8910 ?":)":end

9000 a$ = ""
9020 if a$="" then read a$

9032 if left$(a$,1)="$" then b$=left$(a$,1) : a$=mid$(a$,2) : return
9034 if left$(a$,1)="_" then b$=left$(a$,1) : a$=mid$(a$,2) : goto 9020
9040 if left$(a$,2)="1>" then b$=left$(a$,2) : a$=mid$(a$,3) : l1 = a : goto 9020
9042 if left$(a$,2)="2>" then b$=left$(a$,2) : a$=mid$(a$,3) : l2 = a : goto 9020
9050 if left$(a$,2)="<1" then b$=left$(a$,2) : a$=mid$(a$,3) : b$ = hex$((l1-a-1)AND255) : goto 9110
9052 if left$(a$,2)="<2" then b$=left$(a$,2) : a$=mid$(a$,3) : b$ = hex$((l2-a-1)AND255) : goto 9110

9100 b$=left$(a$,2) : a$=mid$(a$,3)
9110 poke a,val("&h"+b$) : a = a + 1
9120 goto 9020


9200 data &hc000
9210 data 3E01_210080_CD2400_C9$

9300 data &hc100
9310 data 2A9AF3_3E00_0620_1>7723C60810<1c9$


صفحة 4/7
1 | 2 | 3 | | 5 | 6 | 7