From taipan.waterloo.edu!sgroup-owner Wed Jun 24 15:15:58 1992 Received: from taipan.uwaterloo.ca ([129.97.108.61]) by watdragon.waterloo.edu with SMTP id <168080>; Wed, 24 Jun 1992 15:15:57 -0400 Received: from ifi.uio.no ([129.240.64.2]) by taipan.uwaterloo.ca with SMTP id <31134>; Wed, 24 Jun 1992 15:13:03 -0400 Received: from yrsa.ifi.uio.no by ifi.uio.no with SMTP id ; Wed, 24 Jun 1992 21:12:42 +0200 From: Thomas Flemming Received: by yrsa.ifi.uio.no ; Wed, 24 Jun 1992 21:12:42 +0200 Date: Wed, 24 Jun 1992 15:12:42 -0400 Message-Id: <199206241912.AAyrsa.ifi.uio.no28765@yrsa.ifi.uio.no> To: thomasfl@ifi.uio.no Cc: sgroup@taipan.uwaterloo.ca Subject: Samlabel V1.01 Status: RO Here's an expanded version of Gary's samlabel wich gives you this output. Type: S550 ---------------- | Industrial | | Strength | | Techno Synth | | Percussion | | RSB-5504 | ---------------- 1 Industry 2 Velo 3 Timba 4 KlinkNklank 5 Jar 6 Pop 7 Zap! 8 Eerie 9 Eerie 2 10 Block Head 11 Noizee 1 12 13 14 15 16 1 CHESTIMB 0.4 2 Crick 0.4 3 Open HAT 0.4 x2 4 Klank 0.4 5 HI Q 1 0.4 6 HI Q 2 0.4 7 RZ TD S1 0.4 8 EERIE 1 0.4 9 REZNOIZ2 0.8 10 KLINK 1 0.4 11 REZNOIZ1 0.4 12 ZAPPO 1 0.8 13 SKRTCH 1 0.4 14 SKRATCH2 0.8 15 REZ LOG1 0.4 16 MOD ZAP1 0.4 17 Tumba 0.4 18 POPPP! 0.4 19 KRAKO 0.4 20 CHEESHAT 0.8 21 LOWBLK12 0.4 22 HiBlock1 0.4 23 MidBlock 0.4 24 AmbiaJar 0.8 25 KIKSNARE 0.4 26 HammrHit 0.8 x2 27 AIREXPLO 1.6 28 AIREXPLK SUB 27 29 AIREXPLR SUB 19 30 AIREXPLM SUB 20 31 AIREXPLP SUB 16 32 AIREXPLZ SUB 5 Wave Bank A 7.2 Wave Bank B 7.2 /************************************************************************/ /* NAME */ /* samlabel - print a Roland 12-bit-sample-disk label and catalog */ /* SYNOPSIS */ /* samlabel roland-12-bit-sample-disk-file */ /* DESCRIPTION */ /* samlabel prints the disk label and contents for a Roland */ /* 12-bit sample-disk. */ /* The disk label layout is a bit strange. */ /* */ /* Additional features for printing disk and tone type */ /* added by Thomas Flemming, V1.01 23 June 1992. */ /* */ /* AUTHOR */ /* Copyright 1992 by Gary J. Murakami */ /* V1.0 (4 May 1992) Freely distibutable for non-comercial use. */ /* All other rights reserved. */ /************************************************************************/ #include #include "rs12.h" void printLabel(Disk * disk) { int i, j, sec, sub ,tone ,freq, bank ; float secs, A,B ; byte * s; char *wptr; s = disk->functionParameter.diskLabel; disk->systemProgram.data[8] = 0; wptr = &disk->systemProgram.data[4]; /* The string wptr should be either "S-50", "S550", "S330" or "W-30". */ printf("Type: %s ----------------\n", wptr); printf(" | %-12.12s |\n", s); s += 12; for (i = 0; i < 4; i++) { printf(" |"); putchar(' '); for (j = 0; j < 12; j++) putchar(*(s + j*4 + i)); putchar(' '); putchar('|'); putchar('\n'); } printf(" ----------------\n"); for (i = 0; i < 16; i++) { printf("%2d %-12.12s ", i + 1, disk->patchParameter[i].patchName); putchar('\n'); } putchar('\n'); for (i = 0; i < 32; i++) { sec = disk->toneParameter[i].waveSegmentLength; sub = disk->toneParameter[i].sourceTone; freq = disk->toneParameter[i].samplingFrequency; bank = disk->toneParameter[i].waveBank; secs = sec*0.4; printf("%2d %-12.12s", i + 1 , disk->toneParameter[i].toneName); if (i!=sub) printf("SUB %d", sub+1); else { printf("%3.1f", secs); if (freq) printf(" x2"); } putchar('\n'); if (!bank) { if (i==sub) A=A+secs; } else { if (i==sub) B=B+secs; } } printf("Wave Bank A %3.1f Wave Bank B %3.1f\n",A,B); } Disk disk; main(int argc, char ** argv) { int i; FILE * fin; if (argc <= 1) { printf("usage: %s Roland-12-bit-sample-disk-file\n", argv[0]); exit(1); } i = 1; if (i < argc) { if ((fin = fopen(argv[i++], "r")) != NULL) { fread(&disk, sizeof(Disk), 1, fin); printLabel(&disk); fclose(fin); } else printf("%s: open failed for \"%s\"\n", argv[0], argv[i]); } exit(0); }