How to link pages?

Hi, this is my first time using Sonic pi and I decided to code Axel F.

About 2 thirds into the song I hit a thousand lines of code and it stopped letting me play it on that page.

To fix the problem I carried on coding on the next page. Annoyingly I don’t know how to make the song play on the first page but then immediately play the second page when it is finished.

Does anyone know what you have to do to make this happen? Is it even possible?

Hi @Chewy,

To overcome the buffer limit, there are two choices:

  • use multiple buffers and trigger them one after the other (either manually, or (in the more useful case for you) by using cue X at the bottom of one buffer and sync X at the top of the next).
  • play a code composition stored outside of Sonic Pi altogether, by using the run_file(/path/to/external/file) command.

More detail on these functions is available in the ‘Lang’ section of the help panel :slight_smile:
Have a read if necessary, and let us know if you need any further clarification :+1: