Jump to content
View in the app

A better way to browse. Learn more.

Opusmodus

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

file to list

Featured Replies

Does anybody have an idea, how to loop through a directory and writing the content of a textfile (like the one attached) without the semicolons into normal lists?

Thanks for help.

Achimch1-amp-envs.txt

  • Author
0 1-amp-env 1 11000; 11000 1-amp-env 1 6000; 6000 1-amp-env 0.2 10000; 10000 1-amp-env 1 5000

should change to

0 1-amp-env 1 22000; 22000 1-amp-env 1 12000; 12000 1-amp-env 0.2 20000; 20000 1-amp-env 1 10000

These are sequencer files from Puredata in which I'd like to change the timestamps in msecs to double time.

Input is a txt document and the output should be a txt document as well.

The reason for this approach is that I have quite a few of this files to change ...

The file contents need to be a string.

 

(defun remove-semicolon (string)
  (remove ";" string :test #'string=))

(setf orig "0 1-amp-env 1 11000; 11000 1-amp-env 1 6000; 6000 1-amp-env 0.2 10000; 10000 1-amp-env 1 5000;")
(setf pd1 (string-to-list (remove-semicolon orig)))
(setf pd2 (gen-divide 4 pd1))
(setf pd3 (loop for i in pd2 collect (list (* 2 (1~ i)) (2~ i) (3~ i) (* 2 (4~ i)))))

(join-string-list
 (loop for i in pd3
       collect (string-replace " ;" ";" (join-string-list (list (list-to-string i) ";")))))
=> "0 1-amp-env 1 22000; 22000 1-amp-env 1 12000; 12000 1-amp-env 0.2 20000; 20000 1-amp-env 1 10000;"
  • Author

That looks really good. Thanks a lot. Achim

Create an account or sign in to comment


Copyright © 2014-2026 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.