# Simple Csound editor

**URL:** <https://forum.csound.com/t/simple-csound-editor/228>\
**Category:** Web Csound\
**Created:** [March 31, 2021, 8:24am UTC](https://forum.csound.com/t/simple-csound-editor/228 "2021-03-31T08:24:14Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![rory](https://forum.csound.com/user_avatar/forum.csound.com/rory/32/7_2.png) [@rory](https://forum.csound.com/u/rory)\
**Post date:** [March 31, 2021, 8:24am UTC](https://forum.csound.com/t/simple-csound-editor/228/1 "2021-03-31T08:24:14Z")

</div>

I need a simple editor to embed into some reavel.js lectures slides so I threw [this](https://editor.p5js.org/rorywalsh/sketches/fhAAK3-Wt) together. I just duplicate the sketch with a different instrument any time I need it.

https://editor.p5js.org/rorywalsh/embed/fhAAK3-Wt

The overall layout could be better but my html skills are pretty poor. If anyone makes any improvements please share!

p.s. I just realised that this looks like an image, it’s actually a fully functional Csound editor. Just hack the code and away you go.

---

<div class="post-metadata">

**Author:** ![Andy.Fillebrown](https://forum.csound.com/user_avatar/forum.csound.com/andy.fillebrown/32/40_2.png) [@Andy.Fillebrown](https://forum.csound.com/u/Andy.Fillebrown)\
**Post date:** [March 31, 2021, 2:07pm UTC](https://forum.csound.com/t/simple-csound-editor/228/2 "2021-03-31T14:07:04Z")

</div>

This is great! Thanks for sharing. What’s the best way to fork and edit on this?

---

<div class="post-metadata">

**Author:** ![rory](https://forum.csound.com/user_avatar/forum.csound.com/rory/32/7_2.png) [@rory](https://forum.csound.com/u/rory)\
**Post date:** [March 31, 2021, 3:44pm UTC](https://forum.csound.com/t/simple-csound-editor/228/3 "2021-03-31T15:44:53Z")

</div>

If you just click the source you can download the whole thing, or if you have a p5js editor account you can simply click duplicate 👍

---

<div class="post-metadata">

**Author:** ![Andy.Fillebrown](https://forum.csound.com/user_avatar/forum.csound.com/andy.fillebrown/32/40_2.png) [@Andy.Fillebrown](https://forum.csound.com/u/Andy.Fillebrown)\
**Post date:** [March 31, 2021, 4:01pm UTC](https://forum.csound.com/t/simple-csound-editor/228/4 "2021-03-31T16:01:39Z")

</div>

I made a p5js account but I’m not familiar with it enough to know how to get to the project/source. Are you talking about copying the the source from a browser’s “inspect” window or something?

---

<div class="post-metadata">

**Author:** ![rory](https://forum.csound.com/user_avatar/forum.csound.com/rory/32/7_2.png) [@rory](https://forum.csound.com/u/rory)\
**Post date:** [March 31, 2021, 5:46pm UTC](https://forum.csound.com/t/simple-csound-editor/228/5 "2021-03-31T17:46:52Z")

</div>

If you just click the p5js icon on the top left of the link you can download the source. It doesn’t actually use anything from p5js, I just host it there for simplicity.

---

<div class="post-metadata">

**Author:** ![Andy.Fillebrown](https://forum.csound.com/user_avatar/forum.csound.com/andy.fillebrown/32/40_2.png) [@Andy.Fillebrown](https://forum.csound.com/u/Andy.Fillebrown)\
**Post date:** [March 31, 2021, 6:13pm UTC](https://forum.csound.com/t/simple-csound-editor/228/6 "2021-03-31T18:13:27Z")

</div>

I don’t see a p5js icon on my screen. The editor goes all the way to the top of the screen on iOS Safari.

---

<div class="post-metadata">

**Author:** ![rory](https://forum.csound.com/user_avatar/forum.csound.com/rory/32/7_2.png) [@rory](https://forum.csound.com/u/rory)\
**Post date:** [March 31, 2021, 7:07pm UTC](https://forum.csound.com/t/simple-csound-editor/228/7 "2021-03-31T19:07:32Z")

</div>

Sorry Andy. I had the ‘present’ link and not the actual sketch link. I’ve updated it now. 👍

---

<div class="post-metadata">

**Author:** ![Andy.Fillebrown](https://forum.csound.com/user_avatar/forum.csound.com/andy.fillebrown/32/40_2.png) [@Andy.Fillebrown](https://forum.csound.com/u/Andy.Fillebrown)\
**Post date:** [March 31, 2021, 7:26pm UTC](https://forum.csound.com/t/simple-csound-editor/228/8 "2021-03-31T19:26:06Z")

</div>

Thanks. No worries. You may have accidentally introduced me to the p5js presenter mode, which is great on iOS Safari because it’s so bare-bones and easy to work with on a touchscreen 🙂

---

<div class="post-metadata">

**Author:** ![Andy.Fillebrown](https://forum.csound.com/user_avatar/forum.csound.com/andy.fillebrown/32/40_2.png) [@Andy.Fillebrown](https://forum.csound.com/u/Andy.Fillebrown)\
**Post date:** [April 1, 2021, 1:02am UTC](https://forum.csound.com/t/simple-csound-editor/228/9 "2021-04-01T01:02:40Z")

</div>

Here’s a cleaned up version that uses the latest Csound WASM beta…

[https://editor.p5js.org/docEdub/sketches/zDV8hGElp](https://editor.p5js.org/docEdub/sketches/zDV8hGElp)

Works on Chrome but not Safari yet ☹

---

<div class="post-metadata">

**Author:** ![rory](https://forum.csound.com/user_avatar/forum.csound.com/rory/32/7_2.png) [@rory](https://forum.csound.com/u/rory)\
**Post date:** [April 1, 2021, 8:40am UTC](https://forum.csound.com/t/simple-csound-editor/228/10 "2021-04-01T08:40:11Z")

</div>

![2021-04-01 09.37.00](https://forum.csound.com/uploads/default/original/1X/aafbb458b54f097a11d394606c58bd4b42dd64fd.gif)

🤣 Nice, that’s a lot better. You can embed it directly into your post with an iframe btw. I think there might be some tricks to get it working on Safari, I remember having problems with it before. Let’s ping @stevenyi and see if he can help. He’s the man to know.

---

<div class="post-metadata">

**Author:** ![Andy.Fillebrown](https://forum.csound.com/user_avatar/forum.csound.com/andy.fillebrown/32/40_2.png) [@Andy.Fillebrown](https://forum.csound.com/u/Andy.Fillebrown)\
**Post date:** [April 1, 2021, 10:04am UTC](https://forum.csound.com/t/simple-csound-editor/228/11 "2021-04-01T10:04:55Z")

</div>

Ya Steven replied on Discord that it’s a known issue in Csound WASM beta 4, fixed in source already but not released yet.

---

<div class="post-metadata">

**Author:** ![Andy.Fillebrown](https://forum.csound.com/user_avatar/forum.csound.com/andy.fillebrown/32/40_2.png) [@Andy.Fillebrown](https://forum.csound.com/u/Andy.Fillebrown)\
**Post date:** [April 1, 2021, 6:34pm UTC](https://forum.csound.com/t/simple-csound-editor/228/12 "2021-04-01T18:34:34Z")

</div>

Steven showed me how to build it and I updated the sketch so it works in Safari now. Safari’s audio support isn’t great, so it’s a little glitchy at the start and if you do anything with the UI while it’s playing.  
Better than nothing I guess 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![rory](https://forum.csound.com/user_avatar/forum.csound.com/rory/32/7_2.png) [@rory](https://forum.csound.com/u/rory)\
**Post date:** [April 1, 2021, 6:48pm UTC](https://forum.csound.com/t/simple-csound-editor/228/13 "2021-04-01T18:48:49Z")

</div>

Nice. I just took a look through your code. I’ve a lot to learn 😆
