best way to get the notes from arps?

General discussion about tracking, help and support.
User avatar
recme
Posts: 96
Joined: Thu May 07, 2015 12:47 am
Location: Somewhere, FL
Contact:

best way to get the notes from arps?

Postby recme » Tue Sep 01, 2015 12:19 am

https://www.youtube.com/watch?v=Hz6KO0gnrS8

im trying to cover this c64 song on famitracker to give myself a challenge of covering harder things, but i find that getting the rhythm and the notes for the beginning chords to be difficult. any tips on how to listen to these notes? i tried slowing it down on audacity, but that didnt really work out so well, as the arps were still being played quickly.

i supplied an ftm to show what i have so far, but idk if its correct or not. edits would be greatly appreciated, as well as advice.
Attachments
tintin.ftm
tintin on the moon
(1.75 KiB) Downloaded 72 times

User avatar
HertzDevil
Posts: 475
Joined: Thu Apr 23, 2015 7:39 pm
Location: Hong Kong SAR
Contact:

Re: best way to get the notes from arps?

Postby HertzDevil » Tue Sep 01, 2015 12:50 am

If you are talking about C64 chiptune, the best way is always to debug the SID file which, like NSF, runs on 6502; however, this is often unnecessary because inspecting and corrupting the music data in the SID usually suffices to reverse-engineer at least the music format, if not the whole sound driver. Even if you know chords and harmony theory, often it is still better to view the SID directly in a hex editor or debugger. I will show that in a few hours.

If, on the other hand, you are covering something without the sequenced source, try time-stretching instead of just slowing down. Playing at half speed and then stretching to x1/3 speed seems a good idea, but I am not sure how much stretching you need to identify the individual notes.
refactoring 0cc-famitracker

User avatar
MovieMovies1
Posts: 98
Joined: Mon Apr 20, 2015 6:20 pm
Location: Norway
Contact:

Re: best way to get the notes from arps?

Postby MovieMovies1 » Tue Sep 01, 2015 2:04 am

I put the first chords used in the tune into an FTM.

Instrument names are the arp sequences used. As HertzDevil said, time stretching a tune to identify individual notes may be an effective way to find out what chords the arps are playing.
[INSERT SIGNATURE HERE]

User avatar
Mojitone
Posts: 87
Joined: Tue May 12, 2015 10:15 pm

Re: best way to get the notes from arps?

Postby Mojitone » Tue Sep 01, 2015 10:55 am

You can also play channels separately using the older version of SIDPLAY and then record the output for each channel. Makes covering C64 songs much easier.

Nothing beats debugging though.
Formerly Macromaniac
Soundcloud

User avatar
HertzDevil
Posts: 475
Joined: Thu Apr 23, 2015 7:39 pm
Location: Hong Kong SAR
Contact:

Re: best way to get the notes from arps?

Postby HertzDevil » Tue Sep 01, 2015 11:27 am

Taking the SOASC= SID as reference, the song table is located at $09F1 of the file:

Code: Select all

AE 0A CC 0A DE 0A 01 04 07
78 08 AB 08 B0 08 01 04 01
B0 0F B3 0F B6 0F 02 00 05
There are five entries per song:
  • three little-endian offsets pointing to the pattern data for each channel (to get the actual address in the file, 0x7E is added, which comes from the SID header);
  • what appears to be two bytes controlling the song tempo;
  • a global transpose byte, which is a 7-bit signed value.
From above it can be seen that the pattern data for track 1, channel 2 is located at $0ACC + 0x7E = $0B4A:

Code: Select all

80 7C 02 73 07 73 02 73 07 73 02 8C 7B 0F 8E 77 0F FF
These commands make up the entire channel:
  • 00-1B: Play the pattern pointed to by the offset table at $0208 - $023F, indexed by the byte.
  • 7x: Set the number of repeats to x + 1.
  • 80-FD: Set the channel transpose to the byte subtracted by 0x80, as above.
  • FF: End of channel.
This says that pattern 02 (the one shown in the FTM of the post above) will be played 13 times without transposition, 07 played 4 times, 02 played 4 times, and so on. To demonstrate, the offset of pattern 07 is stored at $0216, giving $0CFF + 0x7E = $0D7D as the address of the pattern data.

The arpeggio table is located at $0A14. Sixteen low bytes of the arpeggio addresses are followed by their high bytes; these are absolute addresses (the SID's load address is $E000). The actual definitions begin at $0A54 of the file:

Code: Select all

Index  Offset  Content             MML
60     $0A54   10 00 03 07 FF      { | 0 0 3 3 7 7 }
61     $0A59   10 00 04 07 FF      { | 0 0 4 4 7 7 }
62     $0A5E   10 00 05 08 FF      { | 0 0 5 5 8 8 }
63     $0A63   10 00 05 09 FF      { | 0 0 5 5 9 9 }
64     $0A68   10 00 03 08 FF      { | 0 0 3 3 8 8 }
65     $0A6D   10 00 04 09 FF      { | 0 0 4 4 9 9 }
66     $0A72   00 00 02 05 09 FF   { | 0 2 5 9 }
67     $0A78   00 00 03 05 08 FF   { | 0 3 5 8 }
68     $0A7E   00 00 04 07 09 FF   { | 0 4 7 9 }
69     $0A84   00 00 04 07 0B FF   { | 0 4 7 11 }
6A     $0A8A   00 00 04 05 09 FF   { | 0 4 5 9 }
6B     $0A90   00 00 02 06 09 FF   { | 0 2 6 9 }
6C     $0A96   00 00 03 07 0A FF   { | 0 3 7 10 }
(the last three are probably reserved for percussion)
The first byte is separated into two digits, representing tick count (plus one) and the loop point respectively; the rest are semitone offsets until byte FF.

We are now ready to transcribe this pattern:

Code: Select all

$0D7D: C5 84 69 2C 82 2C 84 2C 86 2C 82 2C 86 2C
$0D8B: 6C 2B 2B 2B 2B
$0D90: C5 84 66 2E 82 2E 84 2E 86 2E 82 2E 86 2E
$0D9E: 67 2B 2B 84 2B 2B 2B FF
There are a few types of commands here:
  • 00-5F: Play the given note, with 0x30 as Middle C, while taking global transpose and pattern transpose into account.
  • 6x: Set the arpeggio table to x.
  • 8x: Set the note length to x. A value of 1 can be assumed to represent a 32nd note.
  • Cx: Set the instrument index to x. Try locating the instrument definitions by yourself (this is what necessitates debugging most of the time).
  • FF: End of pattern.
The result is shown in the attached FTM. The whole analysis is done in a hex editor and a SID player, mainly by simply zeroing out random sections in the SID file until the desired part is located; similar techniques can be applied to all NSFs and SIDs and GBS's and so on. The note cuts are there due to SID limitations.
Attachments
07.ftm
(3.95 KiB) Downloaded 57 times
refactoring 0cc-famitracker

User avatar
snowolf
Posts: 73
Joined: Wed Jul 15, 2015 11:51 pm
Location: France

Re: best way to get the notes from arps?

Postby snowolf » Tue Sep 01, 2015 11:29 am

I don't know if it's intended or just a SID thing, but the original track is in a slightly highter pitch than yours. I tried with ~P84 and it feeled better.

User avatar
HertzDevil
Posts: 475
Joined: Thu Apr 23, 2015 7:39 pm
Location: Hong Kong SAR
Contact:

Re: best way to get the notes from arps?

Postby HertzDevil » Thu Sep 03, 2015 3:19 am

The frequency table for 93 notes of the SID file is stored at $014C-$01A8 (low bytes) and $01AB-$0207 (high bytes). Using the frequency formula for PAL provided here, the middle octave of the table looks like this:

Code: Select all

Lo      Hi      Reg    Freq     Cent
$017A   $01D9   11C0   266.85   +34.22
$017B   $01DA   12CE   282.70   +34.15
$017C   $01DB   13EC   299.50   +34.06
$017D   $01DC   151C   317.35   +34.3
$017E   $01DD   165D   336.20   +34.19
$017F   $01DE   17B2   356.23   +34.36
$0180   $01DF   191A   377.37   +34.17
$0181   $01E0   1A98   399.80   +34.14
$0182   $01E1   1C2D   423.59   +34.18
$0183   $01E2   1DDA   448.78   +34.2
$0184   $01E3   1FA0   475.44   +34.11
$0185   $01E4   2182   503.75   +34.23

The average detune of the whole table is about +34.22 cents.
refactoring 0cc-famitracker

User avatar
Ares64
Posts: 49
Joined: Mon Jun 15, 2015 11:08 am
Location: Hell
Contact:

Re: best way to get the notes from arps?

Postby Ares64 » Thu Sep 03, 2015 12:47 pm

what i do is record the channel with the arps in it, put it in audacity and listen to each note of the arp individually. usually with a lot of slowdown so i can figure it out - you can usually tell the separate notes in the arp apart if you zoom in close enough

User avatar
Highway Man
Posts: 127
Joined: Fri Aug 14, 2015 6:09 am
Contact:

Re: best way to get the notes from arps?

Postby Highway Man » Thu Oct 01, 2015 6:30 pm

That's what I did with my Flash covers. That song was difficult at first but I got the hang of it.
the artist formerly known as highway guy
now known as pulsebot