The JSB Chorales dataset contains Bach chorales arranged as four-track piano rolls for training music-generation models such as MuseGAN. Each track represents a vocal part—soprano, alto, tenor, or bass—and each song uses the shape (4, 2, 16, 84): four tracks, two bars, sixteen steps per bar, and 84 possible pitches per step. section 13.0 section 13.1.2
Its representation breaks each musical piece into:
- Four vocal tracks corresponding to soprano, alto, tenor, and bass. section 13.1.2
- Two bars per track, with sixteen time steps in each bar. section 13.1.2
- An 84-value one-hot pitch vector at every step, using values of -1 and 1 rather than 0 and 1. section 13.1.2 section 13.3.1
Loading a training batch
Download Jsb16thSeparated.npz, create a MidiDataset, inspect the first song, and batch the data with a PyTorch DataLoader. The first song has shape torch.Size([4, 2, 16, 84]); a flattened value check returns {-1.0, 1.0}. section 13.3.1
