The latest version may be able to do what you require with the Multi-Riffs feature. You should be able to generate a specified number of bars, and then save a selected result as a WAV file.

Check out this video tutorial



BIAB & RB2026 Win.(Audiophile), Windows 10 Pro & Windows 11, Cakewalk Bandlab, Izotope Prod.Bundle, Roland RD-1000, Synthogy Ivory, Session Keys Grand S & Electric R, Kontakt, Focusrite 18i20, KetronSD2, NS40M, Pioneer Active Monitors.